projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix bogus lazy allocation in ctermid and missing malloc failure check
[musl]
/
src
/
temp
/
mktemp.c
diff --git
a/src/temp/mktemp.c
b/src/temp/mktemp.c
index
ed2c103
..
24c858b
100644
(file)
--- a/
src/temp/mktemp.c
+++ b/
src/temp/mktemp.c
@@
-10,9
+10,8
@@
char *__mktemp(char *template)
{
size_t l = strlen(template);
int retries = 10000;
- unsigned long r;
- if (l < 6 ||
strcmp(template+l-6, "XXXXXX"
)) {
+ if (l < 6 ||
memcmp(template+l-6, "XXXXXX", 6
)) {
errno = EINVAL;
*template = 0;
return template;