diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2021-02-01 20:41:27 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-01 20:41:27 -0500 |
| commit | cf8ba91e32f01eb889471499f0f2bbb422a7fb8f (patch) | |
| tree | 2d10688ac41b9e427e34f9917cfa2ecc64809f56 /lib/printf/printf-pos.c | |
| parent | 578d772bc1660b1180c9f19ca59f8566740f58c0 (diff) | |
| parent | 738cca0ab4b900e2ecdb1ab28bc431fca014e6b0 (diff) | |
Merge pull request #7994 from opensourcerouting/disable-printf-n
lib/printf: disable `%n` specifier
Diffstat (limited to 'lib/printf/printf-pos.c')
| -rw-r--r-- | lib/printf/printf-pos.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/printf/printf-pos.c b/lib/printf/printf-pos.c index cc03f7ef9a..ac775bea4e 100644 --- a/lib/printf/printf-pos.c +++ b/lib/printf/printf-pos.c @@ -384,6 +384,7 @@ reswitch: switch (ch) { goto error; break; #endif /* !NO_FLOATING_POINT */ +#ifdef DANGEROUS_PERCENT_N case 'n': if (flags & INTMAXT) error = addtype(&types, TP_INTMAXT); @@ -404,6 +405,7 @@ reswitch: switch (ch) { if (error) goto error; continue; /* no output */ +#endif case 'O': flags |= LONGINT; /*FALLTHROUGH*/ @@ -576,6 +578,7 @@ reswitch: switch (ch) { goto error; break; #endif /* !NO_FLOATING_POINT */ +#ifdef DANGEROUS_PERCENT_N case 'n': if (flags & INTMAXT) error = addtype(&types, TP_INTMAXT); @@ -596,6 +599,7 @@ reswitch: switch (ch) { if (error) goto error; continue; /* no output */ +#endif case 'O': flags |= LONGINT; /*FALLTHROUGH*/ |
