public inbox for lvm2-cvs@sourceware.org help / color / mirror / Atom feed
From: agk@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/dmeventd/mirror dmeventd_mirror.c Date: Thu, 11 Jan 2007 20:11:00 -0000 [thread overview] Message-ID: <20070111201120.22188.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@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];
next reply other threads:[~2007-01-11 20:11 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-01-11 20:11 agk [this message] -- strict thread matches above, loose matches on Subject: below -- 2006-02-06 19:34 agk 2006-01-27 20:48 agk 2006-01-27 20:47 agk 2006-01-27 20:43 agk
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20070111201120.22188.qmail@sourceware.org \ --to=agk@sourceware.org \ --cc=lvm-devel@redhat.com \ --cc=lvm2-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).