summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2022-03-29 04:32:18 -0600
committerKarl Williamson <khw@cpan.org>2022-04-01 09:19:55 -0600
commit433cf356e25977406a5aab3a0e7c00ccacd18c93 (patch)
tree7da4b7ea5520e0b480e6582ba3bacf7c2d63df63 /toke.c
parent8c1c83b954796de8077cc1a2e120c1dc039d0519 (diff)
downloadperl-433cf356e25977406a5aab3a0e7c00ccacd18c93.tar.gz
toke.c Add NUL terminator in both branches
By moving the setting of this to after two branches of a conditional come together, it gets set always, instead of sometimes.
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index 7d3fa47176..ae89bdcc38 100644
--- a/toke.c
+++ b/toke.c
@@ -11362,8 +11362,9 @@ Perl_scan_str(pTHX_ char *start, int keep_bracketed_quoted, int keep_delims, int
}
Copy(s, open_delim_str, delim_byte_len, char);
- open_delim_str[delim_byte_len] = '\0';
}
+ open_delim_str[delim_byte_len] = '\0'; /* Only for safety */
+
/* mark where we are */
PL_multi_start = CopLINE(PL_curcop);