xorg-server-1.14.1.902 - build error
Matt Dew
marcoz at osource.org
Thu Jun 20 17:15:57 PDT 2013
Thanks Chris.
Keith, I can't just apply patches in the stable branch though right?
Has anyone else seen this outside of gcc-4.8 snapshot?
Any objections to this being an known issue for 1.14.2. With the hope
that this patch gets in for 1.14.3?
thanks,
Matt
On 06/20/2013 12:31 PM, Chris Clayton wrote:
>
>
> On 06/14/13 22:35, Chris Clayton wrote:
>> HI
>>
>> I'm getting a error building xorg-server-1.14.1.902 with thelatest
>> snapshot of gcc-4.8:
>>
>> kinput.c:225:43: error: array subscript is above array bounds
>> [-Werror=array-bounds]
>>
>> This is because kdNumInputFds can become equal to KD_MAX_INPUT_FDS in
>> KdRegisterFd(). This means that in KdUnregisterFd(), kdInputFds[j + 1]
>> can be beyond the end of the array.
>>
>> The patch below fixes the error.
>>
>
> As an update, I've been running xorg-server-1.14.1.902 with the patch
> below applied for almost a week now with no adverse effects.
>
> Chris
>> Signed-off-by: Chris Clayton <chris2553 at googlemail.com
>> <mailto:chris2553 at googlemail.com>>
>> ---
>> --- xorg-server-1.14.1.902/hw/kdrive/src/kinput.c~ 2013-06-14
>> 21:22:31.000000000 +0100
>> +++ xorg-server-1.14.1.902/hw/kdrive/src/kinput.c 2013-06-14
>> 21:47:21.000000000 +0100
>> @@ -221,7 +221,7 @@
>> if (do_close)
>> close(kdInputFds[i].fd);
>> kdNumInputFds--;
>> - for (j = i; j < kdNumInputFds; j++)
>> + for (j = i; j < (kdNumInputFds - 1); j++)
>> kdInputFds[j] = kdInputFds[j + 1];
>> break;
>> }
>> ---
>>
More information about the xorg-devel
mailing list