From: Ben Pfaff Date: Wed, 23 Feb 2011 21:11:35 +0000 (-0800) Subject: test-ovsdb: Check uuid_from_string() return value. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bca51200523113950f223666a5d07fb993e319f7;p=openvswitch test-ovsdb: Check uuid_from_string() return value. Coverity #10699. --- 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));