Pattern: Overlapping data in s[n]printf()
Issue: -
The variable is used both as a parameter and as destination in s[n]printf()
. The origin and destination buffers overlap. From glibc (C-library) documentation:
If copying takes place between objects that overlap as a result of a call to
sprintf()
orsnprintf()
, the results are undefined.