Search code examples
cprintfoverlapping

Does sprint(buf, "%s", buf+10) where strlen(buf+10)>10 count as overlapping?


I know I should use memmove if there's overlapping but I can't imagine how sprintf (or memcpy for that matter) would be coded such that it would run into a problem.


Solution

  • The source and target are clearly overlapping. So, yes, this counts.