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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to