[Swan-dev] avoid strncpy : Discouraged or forbidden C functions

Paul Wouters paul at nohats.ca
Wed Aug 16 17:11:08 UTC 2017

On Wed, 16 Aug 2017, Antony Antony wrote:

> "Discouraged or forbidden C functions"
> https://libreswan.org/wiki/Discouraged_or_forbidden_C_functions
> The new ones are coming in faster than Hugh (occasionally and I) can fix:)
> Here is an example fix of fix:)

I've fixed a few as well in the past and now :P

The problem with these ones is that I'm not sure if these are really
null terminated strings, since some of this goes into the kernel via
netlink. So I avoided using jamstr() which assumes null terminated

But I'm happy to override strcpy() into something guaranteeing a compile
failure :)


More information about the Swan-dev mailing list