mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-16 12:03:03 -05:00
Fix a format string vulnerability if MALLOC_LOG is set.
(cherry picked from commit e443fd3a77f8c138b458fb8759dc0747703541ac)
This commit is contained in:
parent
9c8a3cb6fb
commit
3a43bec44c
4
misc.c
4
misc.c
@ -736,7 +736,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)
|
||||||
@ -778,7 +778,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