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

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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: [PATCH] off by one error in nis-publickey


Thorsten Kukuk wrote:
> there is a off by one error in nis-publickey:

While this is correct for the current definition of the array the
question is why is the array and the strncpy not defined as 2 *
HEXKEYBYTES + 1.

The memcmp starts at HEXKEYBYTES and continues for KEYCHECKSUMSIZE.  In
fact, the array should be HEXKEYBYTES + KEYCHECKSUMSIZE in size (no NUL
byte needed).  So, why doesn't it do it like this?

-- 
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â

Attachment: signature.asc
Description: OpenPGP digital signature


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