]> granicus.if.org Git - php/commitdiff
MFH
authorAntony Dovgal <tony2001@php.net>
Thu, 28 Dec 2006 14:17:38 +0000 (14:17 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 28 Dec 2006 14:17:38 +0000 (14:17 +0000)
ext/ereg/ereg.c
ext/sockets/sockets.c
ext/standard/reg.c

index 3e48d39ab3c17715b34ca262bc4bcd406c2cc9be..3408e77212ae6e271db191460056047a262ccdf0 100644 (file)
@@ -425,7 +425,7 @@ PHPAPI char *php_reg_replace(const char *pattern, const char *replace, const cha
                                buf = nbuf;
                        }
                        /* stick that last bit of string on our output */
-                       strcat(buf, &string[pos]);
+                       strlcat(buf, &string[pos], buf_len);
                }
        }
 
index db08598cbc1ea5908cc56b8ada4ee3c4fd645fe6..23caf9556cff4e1b2b27ec25244f9215193d60de 100644 (file)
@@ -1600,11 +1600,12 @@ PHP_FUNCTION(socket_set_option)
 {
        zval                    *arg1, **arg4;
        struct linger   lv;
-       struct timeval tv;
        php_socket              *php_sock;
        int                             ov, optlen, retval; 
 #ifdef PHP_WIN32
        int                             timeout;
+#else 
+       struct timeval tv;
 #endif
        long                            level, optname;
        void                    *opt_ptr;
index 3e48d39ab3c17715b34ca262bc4bcd406c2cc9be..3408e77212ae6e271db191460056047a262ccdf0 100644 (file)
@@ -425,7 +425,7 @@ PHPAPI char *php_reg_replace(const char *pattern, const char *replace, const cha
                                buf = nbuf;
                        }
                        /* stick that last bit of string on our output */
-                       strcat(buf, &string[pos]);
+                       strlcat(buf, &string[pos], buf_len);
                }
        }