Re: [PATCH] potential array overrun

2012-06-12 Thread Marc Lehmann
On Tue, Jun 12, 2012 at 10:53:10AM +0200, Zsbán Ambrus amb...@math.bme.hu wrote: -  if (expect_false (signum = 0 || signum EV_NSIG)) +  if (expect_false (signum = 0 || signum = EV_NSIG))     return;   --signum; I think your reasoning is incorrect. While this may seem strange, 64

[PATCH] potential array overrun

2012-06-11 Thread Steve Grubb
Hi, Below is a patch that fixes a theoretical array overrun. I say theoretical because I don't think there is a signal number high enough to trigger this. But any ways... the issue is EV_NSIG starts off being 65. Then the array is declared as signals [EV_NSIG - 1]; Which means 0-63 would be

Re: [PATCH] potential array overrun

2012-06-11 Thread Marc Lehmann
On Mon, Jun 11, 2012 at 08:43:03AM -0400, Steve Grubb sgr...@redhat.com wrote: if signum is 65, it won't return. This gets decremented to 64 and then used as an index for a memory write. This is 1 over the top since 63 is the largest valid index. I doubt this causes any problems, but a patch