[master] 0fa4baead Using memcpy() in bstrcpy() confused FlexeLint, use strcpy() instead.
Nils Goroll
nils.goroll at uplex.de
Mon Oct 21 08:45:30 UTC 2019
On 21/10/2019 10:34, Poul-Henning Kamp wrote:
> - size_t lbstrcpy = strlen(src) + 1; \
> - assert(lbstrcpy <= sizeof dst); \
> - memcpy(dst, src, lbstrcpy); \
> + assert(strlen(src) + 1 <= sizeof (dst)); \
> + strcpy((dst), (src)); \
> } while (0)
>
> // TODO #define strcpy BANNED
This introduces the conflict with the plan to #define ban strcpy.
Actually this variant of the code had been discussed
https://github.com/varnishcache/varnish-cache/pull/3080
Can't we find a different way to appease flexelint?
--
** * * UPLEX - Nils Goroll Systemoptimierung
Scheffelstraße 32
22301 Hamburg
tel +49 40 28805731
mob +49 170 2723133
fax +49 40 42949753
xmpp://slink@jabber.int.uplex.de/
http://uplex.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-commit/attachments/20191021/7fcc8ac2/attachment.bin>
More information about the varnish-commit
mailing list