summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-05-28 23:19:33 +0900
committerNobuyoshi Nakada <[email protected]>2024-05-29 01:02:32 +0900
commit31c9a3a1d330606493e5e70aec3cd1a36d8c61a0 (patch)
tree3ed068b197ef7ed01ffc4325cc99774a5d1ff2a0 /sprintf.c
parent61e2916d1c297eeabcfeba4815cececff20db1dd (diff)
[Bug #20438] Disallow "%\n" and "%\0"
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/sprintf.c b/sprintf.c
index b2d89617aa..98877d25d2 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -429,10 +429,6 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
GETNUM(prec, precision);
goto retry;
- case '\n':
- case '\0':
- p--;
- /* fall through */
case '%':
if (flags != FNONE) {
rb_raise(rb_eArgError, "invalid format character - %%");