svn commit: r192021 - head/sys/geom/concat
Edward Tomasz Napierala
trasz at FreeBSD.org
Tue May 12 16:59:53 UTC 2009
Author: trasz
Date: Tue May 12 16:59:50 2009
New Revision: 192021
URL: http://svn.freebsd.org/changeset/base/192021
Log:
Check return value of gctl_get_asciiparam().
Found with: Coverity Prevent(tm)
CID: 1118
Modified:
head/sys/geom/concat/g_concat.c
Modified: head/sys/geom/concat/g_concat.c
==============================================================================
--- head/sys/geom/concat/g_concat.c Tue May 12 16:39:43 2009 (r192020)
+++ head/sys/geom/concat/g_concat.c Tue May 12 16:59:50 2009 (r192021)
@@ -753,6 +753,10 @@ g_concat_ctl_create(struct gctl_req *req
for (attached = 0, no = 1; no < *nargs; no++) {
snprintf(param, sizeof(param), "arg%u", no);
name = gctl_get_asciiparam(req, param);
+ if (name == NULL) {
+ gctl_error(req, "No 'arg%d' argument.", no);
+ return;
+ }
if (strncmp(name, "/dev/", strlen("/dev/")) == 0)
name += strlen("/dev/");
pp = g_provider_by_name(name);
More information about the svn-src-all
mailing list