Re: generic strncpy - off-by-one error

From: Valdis . Kletnieks
Date: Tue Aug 12 2003 - 10:07:57 EST


On Tue, 12 Aug 2003 23:50:06 +0900, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx> said:

> - while (count) {
> + while (count > 1) {

Given that count is a size_t, which seems to be derived from 'unsigned int' or
'unsigned long' on every platform, how are these any different?

Attachment: pgp00003.pgp
Description: PGP signature