Unicode data updated to be the latest beta of the Unicode 3.0.
[p5sagit/p5-mst-13.2.git] / pp.c
diff --git a/pp.c b/pp.c
index e3969be..a020f54 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -3350,8 +3350,11 @@ PP(pp_unpack)
        }
        else if (isDIGIT(*pat)) {
            len = *pat++ - '0';
-           while (isDIGIT(*pat))
+           while (isDIGIT(*pat)) {
                len = (len * 10) + (*pat++ - '0');
+               if (len < 0)
+                   Perl_croak(aTHX_ "Repeat count in unpack overflows");
+           }
        }
        else
            len = (datumtype != '@');
@@ -4394,8 +4397,11 @@ PP(pp_pack)
        }
        else if (isDIGIT(*pat)) {
            len = *pat++ - '0';
-           while (isDIGIT(*pat))
+           while (isDIGIT(*pat)) {
                len = (len * 10) + (*pat++ - '0');
+               if (len < 0)
+                   Perl_croak(aTHX_ "Repeat count in pack overflows");
+           }
        }
        else
            len = 1;
@@ -5011,7 +5017,8 @@ PP(pp_split)
        if (!(pm->op_pmflags & PMf_MULTILINE)
            && !(pm->op_pmregexp->reganch & ROPT_WARNED)) {
            if (ckWARN(WARN_DEPRECATED))
-               warn("split /^/ better written as split /^/m");
+               Perl_warner(aTHX_ WARN_DEPRECATED,
+                           "split /^/ better written as split /^/m");
            pm->op_pmregexp->reganch |= ROPT_WARNED;
        }       
        while (--limit) {