From bca51200523113950f223666a5d07fb993e319f7 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 23 Feb 2011 13:11:35 -0800 Subject: [PATCH] test-ovsdb: Check uuid_from_string() return value. Coverity #10699. --- tests/test-ovsdb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c index 40d8a8d2..c424abe6 100644 --- a/tests/test-ovsdb.c +++ b/tests/test-ovsdb.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010 Nicira Networks. + * Copyright (c) 2009, 2010, 2011 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1749,7 +1749,9 @@ idl_set(struct ovsdb_idl *idl, char *commands, int step) idltest_simple_set_s(s, arg3); } else if (!strcmp(arg2, "u")) { struct uuid uuid; - uuid_from_string(&uuid, arg3); + if (!uuid_from_string(&uuid, arg3)) { + ovs_fatal(0, "\"%s\" is not a valid UUID", arg3); + } idltest_simple_set_u(s, uuid); } else if (!strcmp(arg2, "r")) { idltest_simple_set_r(s, atof(arg3)); -- 2.30.2