All of lore.kernel.org
 help / color / mirror / Atom feed
From: zkabelac@sourceware.org <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW lib/filters/filter.c
Date: 8 Feb 2012 12:48:15 -0000	[thread overview]
Message-ID: <20120208124815.20897.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac at sourceware.org	2012-02-08 12:48:14

Modified files:
	.              : WHATS_NEW 
	lib/filters    : filter.c 

Log message:
	Add range test for device number
	
	Check the output of atoi is in valid range.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2267&r2=1.2268
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/filters/filter.c.diff?cvsroot=lvm2&r1=1.67&r2=1.68

--- LVM2/WHATS_NEW	2012/02/08 11:34:46	1.2267
+++ LVM2/WHATS_NEW	2012/02/08 12:48:14	1.2268
@@ -1,5 +1,6 @@
 Version 2.02.91 -
 ===================================
+  Add range test for device number in _scan_proc_dev().
   Use signed long for sysconf() call in cmirrord.
   Do not write in front of log buffer in print_log().
   Add boundary test for number of mirror devs and logs.
--- LVM2/lib/filters/filter.c	2012/01/11 20:38:42	1.67
+++ LVM2/lib/filters/filter.c	2012/02/08 12:48:14	1.68
@@ -226,7 +226,7 @@
 
 		/* If it's not a number it may be name of section */
 		line_maj = atoi(((char *) (line + i)));
-		if (!line_maj) {
+		if ((line_maj <= 0) || (line_maj >= NUMBER_OF_MAJORS)) {
 			blocksection = (line[i] == 'B') ? 1 : 0;
 			continue;
 		}



             reply	other threads:[~2012-02-08 12:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08 12:48 zkabelac [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-20 10:47 LVM2 ./WHATS_NEW lib/filters/filter.c zkabelac
2011-01-27  0:21 agk
2011-01-12 15:28 agk
2009-07-09 22:34 snitzer
2009-04-16 10:16 mbroz
2008-04-03 10:29 agk
2008-03-05 18:15 agk
2007-07-26 13:28 agk
2007-07-19  7:06 pcaulfield

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=20120208124815.20897.qmail@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.