[PATCH xserver] kdrive/UnregisterFd: Fix off by one

Adam Jackson ajax at nwnk.net
Mon Nov 30 08:50:22 PST 2015


On Wed, 2015-11-25 at 07:40 +1000, Peter Hutterer wrote:
> On Tue, Nov 24, 2015 at 05:37:36PM +0100, Egbert Eich wrote:
> > From: Egbert Eich <eich at suse.de>
> > 
> > The number of FDs has been decremented already, therefore the
> > number contained the index of the top one that is to me moved down.
> > 
> > This problem was introduced by:
> >   commit 1110b71e360195aab040d835b54540ab558638c5
> >   Author: Chris Clayton <chris2553 at googlemail.com>
> > 
> >     kdrive: fix build error on gcc 4.8 for out-of-bounds array access
> > 
> > The reason for the warning was likely a confused compiler.
> > Hoping to reduce the confusion by moving the decrement behind the end
> > if the copy loop.
> > 
> > Signed-off-by: Egbert Eich <eich at suse.de>
> 
> Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

remote: I: patch #66073 updated using rev 44d0fd435a4eaf45e252b4f00409152a6d599dfc.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   eb36924..44d0fd4  master -> master

- ajax


More information about the xorg-devel mailing list