maxmind / geoipupdate-legacy

GeoIP update client code
GNU General Public License v2.0
258 stars 63 forks source link

Uses strnlen() but does not check for its availability in configuration stage #71

Closed grumpybozo closed 7 years ago

grumpybozo commented 7 years ago

Since strnlen() is still a youngster (2008 POSIX) it is not implemented in some operating systems which are in active use (MacOS X 10.6, Solaris 10, FreeBSD 8, etc.) so the recent addition of one use of it (bin/geoipupdate.c line 593) makes the current version of geoipupdate unbuildable on such systems. See bash or ghostscript for examples of how to deal with strlen() being unavailable.

horgh commented 7 years ago

Hi @grumpybozo. Thank you for reporting this! Good catch!

I think I'd opt to replace it as a solution. It would be good to stick to C99 where possible.