Re: [PATCH] fix read past end of array in md/linear.c

2007-03-11 Thread Neil Brown
On Thursday March 8, [EMAIL PROTECTED] wrote: > On Thu, Mar 08, 2007 at 12:52:04PM -0800, Andy Isaacson wrote: > > Index: linus/drivers/md/linear.c > > === > > --- linus.orig/drivers/md/linear.c 2007-03-02 11:35:55.0 -0800 >

Re: [PATCH] fix read past end of array in md/linear.c

2007-03-11 Thread Neil Brown
On Thursday March 8, [EMAIL PROTECTED] wrote: On Thu, Mar 08, 2007 at 12:52:04PM -0800, Andy Isaacson wrote: Index: linus/drivers/md/linear.c === --- linus.orig/drivers/md/linear.c 2007-03-02 11:35:55.0 -0800 +++

Re: [PATCH] fix read past end of array in md/linear.c

2007-03-08 Thread Andy Isaacson
On Thu, Mar 08, 2007 at 09:37:46PM -0500, Bill Davidsen wrote: > Andy Isaacson wrote: > >% dd bs=1 seek=840716287 if=/dev/zero of=d1 count=1 > >% for i in 2 3 4; do dd if=/dev/zero of=d$i bs=1k count=$(($i+150)); done [snip] > >-for (j=i; i >+for (j=i; j >

Re: [PATCH] fix read past end of array in md/linear.c

2007-03-08 Thread Bill Davidsen
Andy Isaacson wrote: When iterating through an array, one must be careful to test one's index variable rather than another similarly-named variable. The loop will read off the end of conf->disks[] in the following (pathological) case: % dd bs=1 seek=840716287 if=/dev/zero of=d1 count=1 %

Re: [PATCH] fix read past end of array in md/linear.c

2007-03-08 Thread Andy Isaacson
On Thu, Mar 08, 2007 at 12:52:04PM -0800, Andy Isaacson wrote: > When iterating through an array, one must be careful to test one's index > variable rather than another similarly-named variable. > > The loop will read off the end of conf->disks[] in the following > (pathological) case: > > %

[PATCH] fix read past end of array in md/linear.c

2007-03-08 Thread Andy Isaacson
When iterating through an array, one must be careful to test one's index variable rather than another similarly-named variable. The loop will read off the end of conf->disks[] in the following (pathological) case: % dd bs=1 seek=840716287 if=/dev/zero of=d1 count=1 % for i in 2 3 4; do dd

Re: [PATCH] fix read past end of array in md/linear.c

2007-03-08 Thread Andy Isaacson
On Thu, Mar 08, 2007 at 12:52:04PM -0800, Andy Isaacson wrote: When iterating through an array, one must be careful to test one's index variable rather than another similarly-named variable. The loop will read off the end of conf-disks[] in the following (pathological) case: % dd bs=1

[PATCH] fix read past end of array in md/linear.c

2007-03-08 Thread Andy Isaacson
When iterating through an array, one must be careful to test one's index variable rather than another similarly-named variable. The loop will read off the end of conf-disks[] in the following (pathological) case: % dd bs=1 seek=840716287 if=/dev/zero of=d1 count=1 % for i in 2 3 4; do dd

Re: [PATCH] fix read past end of array in md/linear.c

2007-03-08 Thread Bill Davidsen
Andy Isaacson wrote: When iterating through an array, one must be careful to test one's index variable rather than another similarly-named variable. The loop will read off the end of conf-disks[] in the following (pathological) case: % dd bs=1 seek=840716287 if=/dev/zero of=d1 count=1 % for

Re: [PATCH] fix read past end of array in md/linear.c

2007-03-08 Thread Andy Isaacson
On Thu, Mar 08, 2007 at 09:37:46PM -0500, Bill Davidsen wrote: Andy Isaacson wrote: % dd bs=1 seek=840716287 if=/dev/zero of=d1 count=1 % for i in 2 3 4; do dd if=/dev/zero of=d$i bs=1k count=$(($i+150)); done [snip] -for (j=i; icnt-1 sz min_spacing ; j++) +for (j=i;