aboutsummaryrefslogtreecommitdiff
path: root/debug/sprintf_chk.c
diff options
context:
space:
mode:
Diffstat (limited to 'debug/sprintf_chk.c')
-rw-r--r--debug/sprintf_chk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/debug/sprintf_chk.c b/debug/sprintf_chk.c
index 54d4a64255..7ef01653ee 100644
--- a/debug/sprintf_chk.c
+++ b/debug/sprintf_chk.c
@@ -29,6 +29,10 @@ ___sprintf_chk (char *s, int flag, size_t slen, const char *format, ...)
va_list ap;
int ret;
+ /* 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 ();