On Wed, May 07, 2008 at 03:43:52PM +0200, Anders Broman wrote:
> Result of CheckAPI in Wiretap dir is:
> Error: Found prohibited APIs in catapult_dct2000.c: strcpy,strncpy
> Error: Found prohibited APIs in cosine.c: strncpy
> Error: Found prohibited APIs in iseries.c: strncpy,g_strup
> Error: Found prohibited APIs in k12.c: g_strdown
> Error: Found prohibited APIs in netscreen.c: strncpy
> Error: Found prohibited APIs in nettl.c: strcpy
> Error: Found prohibited APIs in network_instruments.c: strncpy
> Error: Found prohibited APIs in visual.c: strncpy
> Error: Found prohibited APIs in vms.c: strncpy
>
> Should those be fixed?
Definitely. strcpy() can be replaced with g_strlcpy(). strncpy() and
the next line that always follows and reads something like
hdr[VMSLINE_LENGTH-1] = '\0' can both be replaced with just g_strlcpy()
as g_strlcpy() ensures there is a terminating NULL.
I believe g_strup/_strdown should be replaced by g_ascii_strup/_strdown,
but I'm not positive.
Thanks!
Steve