diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-02-12 16:22:52 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-02-12 16:25:57 -0500 |
commit | 8604e1da0e7f82114199b86b85e03134c53c3d06 (patch) | |
tree | aa137baac4fb91ea0723532f38cac04b91752a21 | |
parent | 37914e19b9476a497047368a6f2923ae3310001d (diff) | |
download | jack1-8604e1da0e7f82114199b86b85e03134c53c3d06.tar.gz |
try to recognize integers that are NOT UUIDs when parsing them
-rw-r--r-- | libjack/uuid.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libjack/uuid.c b/libjack/uuid.c index 8e23c39..9a3894d 100644 --- a/libjack/uuid.c +++ b/libjack/uuid.c @@ -99,6 +99,12 @@ int jack_uuid_parse (const char *b, jack_uuid_t* u) { if (sscanf (b, "%" PRIu64, u) == 1) { + + if (*u < (0x1LL << 32)) { + /* has not type bits set - not legal */ + return -1; + } + return 0; } |