Check return value of gctl_get_asciiparam().

Found with:	Coverity Prevent(tm)
CID:		1118
This commit is contained in:
Edward Tomasz Napierala 2009-05-12 16:59:50 +00:00
parent f095d54f01
commit 916cd41c47
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=192021

View File

@ -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);