public inbox for lvm2-cvs@sourceware.org help / color / mirror / Atom feed
From: zkabelac@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2 daemons/dmeventd/dmeventd.c ./WHATS_NEW_DM Date: Mon, 13 Feb 2012 11:18:00 -0000 [thread overview] Message-ID: <20120213111847.19043.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2012-02-13 11:18:46 Modified files: daemons/dmeventd: dmeventd.c . : WHATS_NEW_DM Log message: Check for allocation failure Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/dmeventd.c.diff?cvsroot=lvm2&r1=1.88&r2=1.89 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.553&r2=1.554 --- LVM2/daemons/dmeventd/dmeventd.c 2012/02/10 13:46:23 1.88 +++ LVM2/daemons/dmeventd/dmeventd.c 2012/02/13 11:18:45 1.89 @@ -1782,9 +1782,16 @@ } } - _initial_registrations = dm_malloc(sizeof(char*) * (count + 1)); + if (!(_initial_registrations = dm_malloc(sizeof(char*) * (count + 1)))) { + fprintf(stderr, "Memory allocation registration failed.\n"); + exit(EXIT_FAILURE); + } + for (i = 0; i < count; ++i) { - _initial_registrations[i] = dm_strdup(message); + if (!(_initial_registrations[i] = dm_strdup(message))) { + fprintf(stderr, "Memory allocation for message failed.\n"); + exit(EXIT_FAILURE); + } message += strlen(message) + 1; } _initial_registrations[count] = 0; --- LVM2/WHATS_NEW_DM 2012/02/13 11:13:44 1.553 +++ LVM2/WHATS_NEW_DM 2012/02/13 11:18:46 1.554 @@ -1,5 +1,6 @@ Version 1.02.71 - ==================================== + Check for allocation failure in dmeventd restart(). Add few missing allocation failures tests in dmsetup. Fix potential risk of writing in front of buffer in _sysfs_get_dm_name().
reply other threads:[~2012-02-13 11:18 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20120213111847.19043.qmail@sourceware.org \ --to=zkabelac@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).