ossp-pkg/str/str_pcre.c 1.8 -> 1.9
--- str_pcre.c 2003/01/06 19:13:47 1.8
+++ str_pcre.c 2005/10/03 07:40:05 1.9
@@ -674,6 +674,10 @@
while ((cd->ctypes[*p] & ctype_digit) != 0)
min = min * 10 + *p++ - '0';
+ if (min < 0 || min > 65535) {
+ *errorptr = ERR5;
+ return p;
+ }
if (*p == '}')
max = min;
@@ -682,6 +686,10 @@
max = 0;
while ((cd->ctypes[*p] & ctype_digit) != 0)
max = max * 10 + *p++ - '0';
+ if (max < 0 || max > 65535) {
+ *errorptr = ERR5;
+ return p;
+ }
if (max < min) {
*errorptr = ERR4;
return p;
|
|