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/clvmd/clvmd-command.c ./WHATS_NEW Date: Fri, 17 Dec 2010 12:37:00 -0000 [thread overview] Message-ID: <20101217123750.24540.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2010-12-17 12:37:50 Modified files: daemons/clvmd : clvmd-command.c . : WHATS_NEW Log message: Fix NULL pointer check for *buf As ternary operator has lower priority then add operation, this check was not doing what seemed to be expected. So enclose the test in braces and check for NULL in *buf. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-command.c.diff?cvsroot=lvm2&r1=1.43&r2=1.44 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1838&r2=1.1839 --- LVM2/daemons/clvmd/clvmd-command.c 2010/11/30 22:16:25 1.43 +++ LVM2/daemons/clvmd/clvmd-command.c 2010/12/17 12:37:49 1.44 @@ -168,8 +168,8 @@ /* Check the status of the command and return the error text */ if (status) { - *retlen = 1 + (*buf) ? dm_snprintf(*buf, buflen, "%s", - strerror(status)) : -1; + *retlen = 1 + ((*buf) ? dm_snprintf(*buf, buflen, "%s", + strerror(status)) : -1); } return status; --- LVM2/WHATS_NEW 2010/12/15 12:49:55 1.1838 +++ LVM2/WHATS_NEW 2010/12/17 12:37:50 1.1839 @@ -1,5 +1,6 @@ Version 2.02.79 - =================================== + Fix NULL pointer check in error path in clvmd do_command(). (2.02.78) Fix device.c #include to ensure 64-bit fopen64 use. (2.02.51) Create /var/run/lvm directory during clvmd initialisation if missing. Use new dm_prepare_selinux_context instead of dm_set_selinux_context.
next reply other threads:[~2010-12-17 12:37 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-12-17 12:37 zkabelac [this message] 2010-12-22 12:14 zkabelac
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=20101217123750.24540.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).