mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-05-30 16:30:29 -05:00
Fix a format string vulnerability if MALLOC_LOG is set.
This commit is contained in:
parent
6a70f944f6
commit
e443fd3a77
4
misc.c
4
misc.c
@ -755,7 +755,7 @@ void *safemalloc(size_t n, size_t size)
|
|||||||
#else
|
#else
|
||||||
strcpy(str, "Out of memory!");
|
strcpy(str, "Out of memory!");
|
||||||
#endif
|
#endif
|
||||||
modalfatalbox(str);
|
modalfatalbox("%s", str);
|
||||||
}
|
}
|
||||||
#ifdef MALLOC_LOG
|
#ifdef MALLOC_LOG
|
||||||
if (fp)
|
if (fp)
|
||||||
@ -797,7 +797,7 @@ void *saferealloc(void *ptr, size_t n, size_t size)
|
|||||||
#else
|
#else
|
||||||
strcpy(str, "Out of memory!");
|
strcpy(str, "Out of memory!");
|
||||||
#endif
|
#endif
|
||||||
modalfatalbox(str);
|
modalfatalbox("%s", str);
|
||||||
}
|
}
|
||||||
#ifdef MALLOC_LOG
|
#ifdef MALLOC_LOG
|
||||||
if (fp)
|
if (fp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user