Messages in this thread | | | From | Lars Wirzenius <> | Subject | Re: 2.1.20 ext2fs readlink bug+fix | Date | Sat, 11 Jan 1997 06:07:24 +0200 |
| |
[ Please don't Cc: me when replying to my message on a mailing list. ]
Greg Alexander: > Before doing strlen on it, you should put a null as the last > byte in the array (unless it's dynamic, in which case we might be kinda > screwed).
Would it be better to check if it is zero terminated?
{ char *p = memchr(link, '\0', max_length); if (p == NULL) oops(); i = p - link; }
(Or something. I'm not a kernel programmer.)
-- Please read <http://www.iki.fi/liw/mail-to-lasu.html> before mailing me. Please don't Cc: me when replying to my message on a mailing list.
[unhandled content-type:application/pgp-signature] | |