* LVM2/dmeventd/mirror dmeventd_mirror.c
@ 2007-01-11 20:11 agk
0 siblings, 0 replies; only message in thread
From: agk @ 2007-01-11 20:11 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2007-01-11 20:11:20
Modified files:
dmeventd/mirror: dmeventd_mirror.c
Log message:
fail if status args are missing
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/dmeventd/mirror/dmeventd_mirror.c.diff?cvsroot=lvm2&r1=1.11&r2=1.12
--- LVM2/dmeventd/mirror/dmeventd_mirror.c 2007/01/11 19:52:06 1.11
+++ LVM2/dmeventd/mirror/dmeventd_mirror.c 2007/01/11 20:11:19 1.12
@@ -58,7 +58,7 @@
char *dev_status_str;
char *log_status_str;
char *sync_str;
- char *p;
+ char *p = NULL;
int log_argc, num_devs;
/*
@@ -70,12 +70,13 @@
if (!dm_split_words(params, 1, 0, &p))
goto out_parse;
- num_devs = atoi(p);
+ if (!(num_devs = atoi(p)))
+ goto out_parse;
p += strlen(p) + 1;
/* devices names + max log parameters */
args = dm_malloc((num_devs + 8) * sizeof(char *));
- if (!args || dm_split_words(p, num_devs + 8, 0, args) < num_devs)
+ if (!args || dm_split_words(p, num_devs + 8, 0, args) < num_devs + 8)
goto out_parse;
dev_status_str = args[2 + num_devs];
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-01-11 20:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-11 20:11 LVM2/dmeventd/mirror dmeventd_mirror.c agk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.