summaryrefslogtreecommitdiff
path: root/ext/sockets
diff options
context:
space:
mode:
authorJason Greene <jason@php.net>2002-05-08 15:30:04 +0000
committerJason Greene <jason@php.net>2002-05-08 15:30:04 +0000
commitcfb285a391d946e981fb4205bfe1b97f6fba6fe0 (patch)
tree236a1c3f9fdfd02535ca6b197c414a7f6f5fe12d /ext/sockets
parentb43ba8dfe26d3ec7144622c9bb7ffab46742768f (diff)
downloadphp-git-cfb285a391d946e981fb4205bfe1b97f6fba6fe0.tar.gz
Fix overflow
Diffstat (limited to 'ext/sockets')
-rw-r--r--ext/sockets/sockets.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index e944850457..87d5e4380c 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -1292,7 +1292,7 @@ PHP_FUNCTION(socket_recv)
zval_dtor(buf);
Z_TYPE_P(buf) = IS_NULL;
} else {
- recv_buf[retval+1] = '\0';
+ recv_buf[retval] = '\0';
/* Rebuild buffer zval */
zval_dtor(buf);