summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2010-11-25 21:38:06 +0000
committerIlia Alshanetsky <iliaa@php.net>2010-11-25 21:38:06 +0000
commit8f85ff3dd67fbe256b9c7fc7e8bbcd73bdf5e054 (patch)
tree4692bd56acb1b995c9147d0aba530f4b1e21a3bf
parent1d5eff07f3a5c1ff74cf9d0660895fb0764d1ead (diff)
downloadphp-git-8f85ff3dd67fbe256b9c7fc7e8bbcd73bdf5e054.tar.gz
Fixed bug #53304 (quot_print_decode does not handle lower-case hex digits)
-rw-r--r--ext/iconv/tests/bug53304.phpt13
-rw-r--r--ext/standard/quot_print.c2
2 files changed, 14 insertions, 1 deletions
diff --git a/ext/iconv/tests/bug53304.phpt b/ext/iconv/tests/bug53304.phpt
new file mode 100644
index 0000000000..7eb6c4109c
--- /dev/null
+++ b/ext/iconv/tests/bug53304.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #53304 (quot_print_decode does not handle lower-case hex digits)
+--SKIPIF--
+<?php extension_loaded('iconv') or die('skip iconv extension is not available'); ?>
+--FILE--
+<?php
+echo iconv_mime_decode('=?utf-8?Q?Nachricht_=c3=bcber_Kontaktformular_www.inexio.net?=', 0, 'UTF-8') . "\n";
+echo iconv_mime_decode('=?utf-8?Q?Nachricht_=C3=BCber_Kontaktformular_www.inexio.net?=', 0, 'UTF-8') . "\n";
+
+?>
+--EXPECT--
+Nachricht über Kontaktformular www.inexio.net
+Nachricht über Kontaktformular www.inexio.net
diff --git a/ext/standard/quot_print.c b/ext/standard/quot_print.c
index 0bee54fdbb..030e9178ae 100644
--- a/ext/standard/quot_print.c
+++ b/ext/standard/quot_print.c
@@ -68,7 +68,7 @@ PHPAPI unsigned char *php_quot_print_decode(const unsigned char *str, size_t len
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 64, 64, 64, 64, 64, 64,
64, 10, 11, 12, 13, 14, 15, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+ 64, 10, 11, 12, 13, 14, 15, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,