tlaro...@polynum.com writes:

> But then I realized that I have not changed the offending line: the
> strcpy() call since there was no overflow problem: it was doing inplace
> rewrite, suppressing a prefix (doing basename(1) essentially).

Not sure what "inplace" means, but it sounds like it runs afoul of:

  If copying takes place between objects that overlap, the behavior is
  undefined.

and thus it is fair to alert on it.

See:

https://pubs.opengroup.org/onlinepubs/9699919799/functions/strcpy.html

and there is similar language in our man page.

Attachment: signature.asc
Description: PGP signature

Reply via email to