summaryrefslogtreecommitdiff
path: root/ext/imap/php_imap.c
diff options
context:
space:
mode:
authorChuck Hagenbuch <chagenbu@php.net>2000-05-10 12:44:44 +0000
committerChuck Hagenbuch <chagenbu@php.net>2000-05-10 12:44:44 +0000
commitfe22dc5ff8053cbe0f2f46e6294f307c3d12ddc4 (patch)
treed60369d0ce1b290caff35435e6f330487f45cac4 /ext/imap/php_imap.c
parent33f8ab3800cc9c201ed6b2799b47ae7734b1762a (diff)
downloadphp-git-fe22dc5ff8053cbe0f2f46e6294f307c3d12ddc4.tar.gz
fix for segfault. patch from Jade Nicoletti <nicoletti@nns.ch>.
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r--ext/imap/php_imap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index 0ebc9d9cde..32461c91ee 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -3461,7 +3461,7 @@ PHP_FUNCTION(imap_mime_header_decode)
}
if ((encoding_token=(long) php_memnstr(&string[charset_token+2], "?", 1, string+end))) { /* Find token for encoding */
encoding_token -= (long) string;
- if ((end_token=(long) php_memnstr(&string[encoding_token+1], "?=", 2, string+end))) { /* Find token for end of encoded data */
+ if ((end_token=(long) php_memnstr(&string[encoding_token+3], "?=", 2, string+end))) { /* Find token for end of encoded data */
end_token -= (long) string;
memcpy(charset, &string[charset_token+2], encoding_token-(charset_token+2)); /* Extract charset encoding */
charset[encoding_token-(charset_token+2)]=0x00;