This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [COMMITTED] Fix off-by-one bug in tst-fwrite-error


On 15 April 2013 12:56, Andreas Schwab <schwab@suse.de> wrote:
>> I fixed this as obvious.
>
> I don't see anything that needs to change.
>

Earlier buf was defined as:

char buf[5] = "world";

which is wrong since "world" needs 6 characters including the NUL terminaor.

Changing it to:

char buf[] = "world";

resulted in the compiler giving buf size of 6 instead of 5, to
accommodate for the NUL.

Siddhesh
--
http://siddhesh.in


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]