summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-06-03 22:49:55 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-03 22:49:55 +0000
commitb1d91914ebabe76be933f5f742b7228fd199e7e5 (patch)
tree7a0094420fd339b0c83948097135592a9d8d719f /perl.h
parent2de3dbccea8bcb1d17328cd596713c4aa8443082 (diff)
downloadperl-b1d91914ebabe76be933f5f742b7228fd199e7e5.tar.gz
Potential buffer overrun if the radix separator is more than
one byte. Also, under locales, prefer the locale-specific separator over the old boring ".". p4raw-id: //depot/perl@10414
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl.h b/perl.h
index 7d9b2ed2ba..4c878ea15a 100644
--- a/perl.h
+++ b/perl.h
@@ -3434,9 +3434,10 @@ typedef struct am_table_short AMTS;
#define IN_LOCALE \
(PL_curcop == &PL_compiling ? IN_LOCALE_COMPILETIME : IN_LOCALE_RUNTIME)
-#define IS_NUMERIC_RADIX(s) \
+#define IS_NUMERIC_RADIX(s, send) \
(PL_numeric_radix_sv \
&& IN_LOCALE \
+ && SvCUR(PL_numeric_radix_sv) < ((send)-(s)) \
&& memEQ(s, SvPVX(PL_numeric_radix_sv), SvCUR(PL_numeric_radix_sv)))
#define STORE_NUMERIC_LOCAL_SET_STANDARD() \