about summary refs log tree commit diff
path: root/src/temp/mktemp.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-02-20 23:01:22 -0500
committerRich Felker <dalias@aerifal.cx>2013-02-20 23:01:22 -0500
commit8872e4e481d8702e68641605bba279796646773d (patch)
tree4ecce35243f57272bebfed8144f1e04a9d792518 /src/temp/mktemp.c
parent8d2f8064aa3d2cc7380c447dfbd8929543f36f51 (diff)
downloadmusl-8872e4e481d8702e68641605bba279796646773d.tar.gz
musl-8872e4e481d8702e68641605bba279796646773d.tar.xz
musl-8872e4e481d8702e68641605bba279796646773d.zip
use memcmp instead of str[n]cmp for temp function XXXXXX checking
Diffstat (limited to 'src/temp/mktemp.c')
-rw-r--r--src/temp/mktemp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/temp/mktemp.c b/src/temp/mktemp.c
index de0f3709..24c858bb 100644
--- a/src/temp/mktemp.c
+++ b/src/temp/mktemp.c
@@ -11,7 +11,7 @@ char *__mktemp(char *template)
 	size_t l = strlen(template);
 	int retries = 10000;
 
-	if (l < 6 || strcmp(template+l-6, "XXXXXX")) {
+	if (l < 6 || memcmp(template+l-6, "XXXXXX", 6)) {
 		errno = EINVAL;
 		*template = 0;
 		return template;