php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #50363
Patch QP_Patch revision 2010-04-29 23:00 UTC by slusarz at curecanti dot org

Patch QP_Patch for Streams related Bug #50363

Patch version 2010-04-29 23:00 UTC

Return to Bug #50363 | Download this patch
Patch Revisions:

Developer: slusarz@curecanti.org

--- filters.c.old       2010-02-05 14:56:57.536943283 -0700
+++ filters.c   2010-02-05 14:51:11.353644566 -0700
@@ -1051,18 +1051,17 @@
                        } /* break is missing intentionally */

                        case 2: {
-                               unsigned int nbl;
-
                                if (icnt <= 0) {
                                        goto out;
                                }
-                               nbl = (*ps >= 'A' ? *ps - 0x37 : *ps - 0x30);

-                               if (nbl > 15) {
+                               if (!isxdigit((int) *ps)) {
                                        err = PHP_CONV_ERR_INVALID_SEQ;
                                        goto out;
-                               }
-                               next_char = (next_char << 4) | nbl;
+                               }
+
+                               next_char = (next_char << 4) | (*ps >= 'A' ? *ps - 0x37 : *ps - 0x30);

                                scan_stat++;
                                ps++, icnt--;
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 14:01:30 2024 UTC