From 3e289bb0f955d2681c9504e2112dbf1184b0e42e Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Sat, 15 Oct 2011 23:57:33 +0000 Subject: [PATCH] fix potential integer overflow --- ext/soap/php_http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 1f2030189a..7a4bc39da4 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -1386,7 +1386,7 @@ static int get_http_body(php_stream *stream, int close, char *headers, char **r if (header_length < 0) { return FALSE; } - http_buf = emalloc(header_length + 1); + http_buf = safe_emalloc(1, header_length, 1); while (http_buf_size < header_length) { int len_read = php_stream_read(stream, http_buf + http_buf_size, header_length - http_buf_size); if (len_read <= 0) { -- 2.50.1