summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-12-28 12:01:14 +0000
committerAntony Dovgal <tony2001@php.net>2006-12-28 12:01:14 +0000
commit8dce10427fb86dd76a70267bed08e058f9bb716d (patch)
tree4cb58c24882d57da34f89dccc1c7836d8c66076e
parent19fca9176fde25bfe547abe9e213499a9ed17ba9 (diff)
downloadphp-git-8dce10427fb86dd76a70267bed08e058f9bb716d.tar.gz
use strlcat() and a bigger buffer
-rw-r--r--main/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/main.c b/main/main.c
index 95b6424f0f..4d6edc8d71 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1070,7 +1070,7 @@ static void php_message_handler_for_zend(long message, void *data)
case ZMSG_MEMORY_LEAK_REPEATED:
#if ZEND_DEBUG
if (EG(error_reporting) & E_WARNING) {
- char memory_leak_buf[512];
+ char memory_leak_buf[1024];
if (message==ZMSG_MEMORY_LEAK_DETECTED) {
zend_leak_info *t = (zend_leak_info *) data;
@@ -1080,7 +1080,7 @@ static void php_message_handler_for_zend(long message, void *data)
char relay_buf[512];
snprintf(relay_buf, 512, "%s(%d) : Actual location (location was relayed)\n", t->orig_filename, t->orig_lineno);
- strcat(memory_leak_buf, relay_buf);
+ strlcat(memory_leak_buf, relay_buf, sizeof(memory_leak_buf));
}
} else {
unsigned long leak_count = (unsigned long) data;