New answers tagged

0

I'm not aware of a direct security reason to avoid gethostbyname. It isn't like gets which can't be used without risking a buffer overflow except in highly controlled conditions where the application knows the maximum possible size of the input. One reason why gethostbyname is deprecated is that it isn't thread-safe, because it writes its output in a shared ...


1

Deprecated functions are generally tagged by static code analyzers simply because they're deprecated. (That's usually an optional setting.) Many secure coding standards specifically state: "do not use deprecated functions." Apart from some long-ago-fixed bugs, gethostbyname isn't terrible, but that's no reason to use it in new code when a supported ...



Top 50 recent answers are included