aboutsummaryrefslogtreecommitdiff
path: root/debug/vsprintf_chk.c
diff options
context:
space:
mode:
Diffstat (limited to 'debug/vsprintf_chk.c')
-rw-r--r--debug/vsprintf_chk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/debug/vsprintf_chk.c b/debug/vsprintf_chk.c
index 7ef8cf3..c93ca4e 100644
--- a/debug/vsprintf_chk.c
+++ b/debug/vsprintf_chk.c
@@ -25,6 +25,10 @@ ___vsprintf_chk (char *s, int flag, size_t slen, const char *format,
can only come from read-only format strings. */
unsigned int mode = (flag > 0) ? PRINTF_FORTIFY : 0;
+ /* Regardless of the value of flag, let __vsprintf_internal know that
+ this is a call from *printf_chk. */
+ mode |= PRINTF_CHK;
+
if (slen == 0)
__chk_fail ();