commit 03a48c8a9cd9b4e1661964a4dc8e14bdea4bb0d1
parent 6a2d066e3fd7520bbb266712bc24b51ba88ac55e
Author: ukai <ukai>
Date: Wed, 16 Jan 2002 02:50:04 +0000
[w3m-dev 02846]
* regex.c (newRegex0): check msg
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
Diffstat:
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,8 @@
+2002-01-16 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev 02846]
+ * regex.c (newRegex0): check msg
+
2002-01-16 Fumitoshi UKAI <ukai@debian.or.jp>
* [w3m-dev 02845]
diff --git a/regex.c b/regex.c
@@ -172,8 +172,10 @@ newRegex0(char **ex, int igncase, Regex *regex, char **msg, int level)
#endif
else
*(st_ptr++) = (unsigned char)*(p++);
- if (st_ptr >= ®ex->storage[STORAGE_MAX])
- *msg = "Regular expression too long";
+ if (st_ptr >= ®ex->storage[STORAGE_MAX]) {
+ if (msg)
+ *msg = "Regular expression too long";
+ }
return NULL;
}
*(st_ptr++) = '\0';