DragonFly submit List (threaded) for 2004-12
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: src/sbin string functions cleanup
Andre Nathan wrote:
The paches at [1] substitute all calls to strcpy, strcat, strncpy,
strncat and sprintf by the safer strlcpy, strlcat and snprintf for
everything under src/sbin.
Andre,
I've merged your patches with my previous void cast removal. The new
patch is here:
http://yoyodyne.ath.cx/tmp/strl.patch
Two minor issues, though:
1) Due to Joerg's previous work on ldconfig there was nothing left to
patch there. :)
2) I've removed two additional lines of code from ping/ping.c:
snamebuf[sizeof(snamebuf) - 1] = '\0';
and
hnamebuf[sizeof(hnamebuf) - 1] = '\0';
According to strlcpy's manpage it guarantees to NUL-terminate the result
so those two lines seemed no longer necessary. Please correct me if I'm
wrong.
I'll be away for the next two days and will start committing this on
Thursday.
Sascha
--
http://yoyodyne.ath.cx
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]