[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/ereg/regex/regerror.c branches/PHP_5_4/ext/ereg/regex/regerror.c trunk/ext/ereg/regex/regerror.c

2011-08-11 Thread Pierre Joye
pajoye   Thu, 11 Aug 2011 07:11:39 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=314775

Log:
- fix build (introduce by r314641)

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/ereg/regex/regerror.c
U   php/php-src/branches/PHP_5_4/ext/ereg/regex/regerror.c
U   php/php-src/trunk/ext/ereg/regex/regerror.c

Modified: php/php-src/branches/PHP_5_3/ext/ereg/regex/regerror.c
===
--- php/php-src/branches/PHP_5_3/ext/ereg/regex/regerror.c  2011-08-11 
07:07:10 UTC (rev 314774)
+++ php/php-src/branches/PHP_5_3/ext/ereg/regex/regerror.c  2011-08-11 
07:11:39 UTC (rev 314775)
@@ -8,6 +8,7 @@
 #include regex.h
 #include utils.h
 #include regerror.ih
+#include php.h

 /*
  = #define REG_OKAY 0

Modified: php/php-src/branches/PHP_5_4/ext/ereg/regex/regerror.c
===
--- php/php-src/branches/PHP_5_4/ext/ereg/regex/regerror.c  2011-08-11 
07:07:10 UTC (rev 314774)
+++ php/php-src/branches/PHP_5_4/ext/ereg/regex/regerror.c  2011-08-11 
07:11:39 UTC (rev 314775)
@@ -8,6 +8,7 @@
 #include regex.h
 #include utils.h
 #include regerror.ih
+#include php.h

 /*
  = #define REG_OKAY 0

Modified: php/php-src/trunk/ext/ereg/regex/regerror.c
===
--- php/php-src/trunk/ext/ereg/regex/regerror.c 2011-08-11 07:07:10 UTC (rev 
314774)
+++ php/php-src/trunk/ext/ereg/regex/regerror.c 2011-08-11 07:11:39 UTC (rev 
314775)
@@ -8,6 +8,7 @@
 #include regex.h
 #include utils.h
 #include regerror.ih
+#include php.h

 /*
  = #define REG_OKAY 0

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/ereg/regex/regerror.c branches/PHP_5_4/ext/ereg/regex/regerror.c trunk/ext/ereg/regex/regerror.c trunk/ext/ereg/regex.patch

2011-08-09 Thread Xinchen Hui
laruence Tue, 09 Aug 2011 09:35:42 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=314598

Log:
Avoiding strcpy usage, Make static analyzer happy

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/ereg/regex/regerror.c
U   php/php-src/branches/PHP_5_4/ext/ereg/regex/regerror.c
U   php/php-src/trunk/ext/ereg/regex/regerror.c
A   php/php-src/trunk/ext/ereg/regex.patch

Modified: php/php-src/branches/PHP_5_3/ext/ereg/regex/regerror.c
===
--- php/php-src/branches/PHP_5_3/ext/ereg/regex/regerror.c  2011-08-09 
09:34:32 UTC (rev 314597)
+++ php/php-src/branches/PHP_5_3/ext/ereg/regex/regerror.c  2011-08-09 
09:35:42 UTC (rev 314598)
@@ -82,7 +82,7 @@

if (errcodeREG_ITOA) {
if (r-code = 0)
-   (void) strcpy(convbuf, r-name);
+   (void) strncpy(convbuf, r-name, 50);
else
sprintf(convbuf, REG_0x%x, target);
assert(strlen(convbuf)  sizeof(convbuf));

Modified: php/php-src/branches/PHP_5_4/ext/ereg/regex/regerror.c
===
--- php/php-src/branches/PHP_5_4/ext/ereg/regex/regerror.c  2011-08-09 
09:34:32 UTC (rev 314597)
+++ php/php-src/branches/PHP_5_4/ext/ereg/regex/regerror.c  2011-08-09 
09:35:42 UTC (rev 314598)
@@ -82,7 +82,7 @@

if (errcodeREG_ITOA) {
if (r-code = 0)
-   (void) strcpy(convbuf, r-name);
+   (void) strncpy(convbuf, r-name, 50);
else
sprintf(convbuf, REG_0x%x, target);
assert(strlen(convbuf)  sizeof(convbuf));

Modified: php/php-src/trunk/ext/ereg/regex/regerror.c
===
--- php/php-src/trunk/ext/ereg/regex/regerror.c 2011-08-09 09:34:32 UTC (rev 
314597)
+++ php/php-src/trunk/ext/ereg/regex/regerror.c 2011-08-09 09:35:42 UTC (rev 
314598)
@@ -82,7 +82,7 @@

if (errcodeREG_ITOA) {
if (r-code = 0)
-   (void) strcpy(convbuf, r-name);
+   (void) strncpy(convbuf, r-name, 50);
else
sprintf(convbuf, REG_0x%x, target);
assert(strlen(convbuf)  sizeof(convbuf));

Added: php/php-src/trunk/ext/ereg/regex.patch
===
--- php/php-src/trunk/ext/ereg/regex.patch  (rev 0)
+++ php/php-src/trunk/ext/ereg/regex.patch  2011-08-09 09:35:42 UTC (rev 
314598)
@@ -0,0 +1,12 @@
+diff -u regex.orig/regerror.c regex/regerror.c
+--- regex.orig/regerror.c  2011-08-09 17:31:11.0 +0800
 regex/regerror.c   2011-08-09 17:29:53.0 +0800
+@@ -82,7 +82,7 @@
+
+   if (errcodeREG_ITOA) {
+   if (r-code = 0)
+-  (void) strcpy(convbuf, r-name);
++  (void) strncpy(convbuf, r-name, 50);
+   else
+   sprintf(convbuf, REG_0x%x, target);
+   assert(strlen(convbuf)  sizeof(convbuf));

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php