Debian Codegraph @

debian/patches/no-sprintf

raw
1 sprintf is seen as a security vulnerability, so we don't want to use it.
2 ---
3 skel | 4 ++--
4 1 file changed, 2 insertions(+), 2 deletions(-)
5
6 Index: b/skel
7 ===================================================================
8 --- a/skel
9 +++ b/skel
10 @@ -424,11 +424,11 @@ static int fail(const char* fmt, ...)
11 int chars_left, used;
12 va_list ap; va_start(ap, fmt);
13 #ifdef FLEXML_yylineno
14 - used = sprintf(flexml_err_msg,
15 + used = snprintf(flexml_err_msg,flexml_max_err_msg_size,
16 "Invalid XML (XML input line %d, state %d): ",
17 yylineno, YY_START);
18 #else
19 - used = sprintf(flexml_err_msg,
20 + used = snprintf(flexml_err_msg,flexml_max_err_msg_size,
21 "Invalid XML (state %d): ",
22 YY_START);
23 #endif