diff options
author | Theodore Ts'o <tytso@mit.edu> | 2014-01-09 15:06:50 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-01-09 15:06:50 -0500 |
commit | e114288010d01e3957bd5c1c3667d9cb7b73bba8 (patch) | |
tree | 1f6d8b5475aab90452fb0484d6dc225ca0bd6d48 /lib/uuid | |
parent | 46802efa1544f33c5ed5a3cac29cd8fc00d6bdf7 (diff) | |
download | e2fsprogs-e114288010d01e3957bd5c1c3667d9cb7b73bba8.tar.gz |
libuuid: check return value of uuid_parse() in test
Addresses-Coverity-Id: #709477
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'lib/uuid')
-rw-r--r-- | lib/uuid/tst_uuid.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/uuid/tst_uuid.c b/lib/uuid/tst_uuid.c index 33fb80b9..88d928fe 100644 --- a/lib/uuid/tst_uuid.c +++ b/lib/uuid/tst_uuid.c @@ -154,7 +154,10 @@ main(int argc ATTR((unused)) , char **argv ATTR((unused))) printf("UUID time comparison succeeded.\n"); } - uuid_parse(str, tst); + if (uuid_parse(str, tst) < 0) { + printf("UUID parse failed\n"); + failed++; + } if (!uuid_compare(buf, tst)) { printf("UUID parse and compare succeeded.\n"); } else { |