Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Replaced calls to strcpy() with memmove() where the strings overlappe…

…d, for

which case the behavior of strcpy() is undefined.
  • Loading branch information...
commit 3b3e41bdc3b1cc590fcc942be47d185d208455a6 1 parent d437fbe
Darren Hiebert authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 routines.c
View
4 routines.c
@@ -757,13 +757,13 @@ extern char* absoluteFilename (const char *file)
else if (cp [0] != PATH_SEPARATOR)
cp = slashp;
#endif
- strcpy (cp, slashp + 3);
+ memmove (cp, slashp + 3, strlen (slashp + 3) + 1);
slashp = cp;
continue;
}
else if (slashp [2] == PATH_SEPARATOR || slashp [2] == '\0')
{
- strcpy (slashp, slashp + 2);
+ memmove (slashp, slashp + 2, strlen (slashp + 2) + 1);
continue;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.