From e114288010d01e3957bd5c1c3667d9cb7b73bba8 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 9 Jan 2014 15:06:50 -0500 Subject: [PATCH] libuuid: check return value of uuid_parse() in test Addresses-Coverity-Id: #709477 Signed-off-by: "Theodore Ts'o" --- lib/uuid/tst_uuid.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/uuid/tst_uuid.c b/lib/uuid/tst_uuid.c index 33fb80b..88d928f 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 { -- 1.8.3.1