diff options
author | trasz <trasz@FreeBSD.org> | 2009-05-12 16:59:50 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2009-05-12 16:59:50 +0000 |
commit | 953ec5bcb56f0163851ef447ed73429bc22672db (patch) | |
tree | 52e206c876673d8603c82b19d59da26d1cbbf0af /sys/geom/concat | |
parent | b99531d3204bd330e3b02ebd8392ad876049b1b1 (diff) | |
download | FreeBSD-src-953ec5bcb56f0163851ef447ed73429bc22672db.zip FreeBSD-src-953ec5bcb56f0163851ef447ed73429bc22672db.tar.gz |
Check return value of gctl_get_asciiparam().
Found with: Coverity Prevent(tm)
CID: 1118
Diffstat (limited to 'sys/geom/concat')
-rw-r--r-- | sys/geom/concat/g_concat.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/geom/concat/g_concat.c b/sys/geom/concat/g_concat.c index ad56f43..021c9f5 100644 --- a/sys/geom/concat/g_concat.c +++ b/sys/geom/concat/g_concat.c @@ -753,6 +753,10 @@ g_concat_ctl_create(struct gctl_req *req, struct g_class *mp) 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); |