summaryrefslogtreecommitdiffstats
path: root/bug73418.patch
blob: d85e4a61086790d2c007bda93c161464012f07da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Backported from 5.6.28 by Remi.


From b823b14e374251ad6ab437a9631e4b010ca09b68 Mon Sep 17 00:00:00 2001
From: Anatol Belski <ab@php.net>
Date: Thu, 3 Nov 2016 17:03:23 +0100
Subject: [PATCH] Fixed bug #73418 Integer Overflow in "_php_imap_mail" leads
 to crash

---
 ext/imap/php_imap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index 564473b..6c392fb 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -3894,7 +3898,7 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char *
 	char *tsm_errmsg = NULL;
 	ADDRESS *addr;
 	char *bufferTo = NULL, *bufferCc = NULL, *bufferBcc = NULL, *bufferHeader = NULL;
-	int offset, bufferLen = 0;
+	size_t offset, bufferLen = 0;
 	size_t bt_len;
 
 	if (headers) {