Messages in this thread | | | Subject | Re: generic strncpy - off-by-one error | From | Andreas Schwab <> | Date | Tue, 12 Aug 2003 18:09:27 +0200 |
| |
Valdis.Kletnieks@vt.edu writes:
|> On Tue, 12 Aug 2003 23:50:06 +0900, Yoshinori Sato <ysato@users.sourceforge.jp> 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?
Let's suppose count == 1.
Andreas.
-- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." [unhandled content-type:application/pgp-signature] | |