Ignore:
Timestamp:
Aug 6, 2006 2:11:52 PM (18 years ago)
Author:
bennylp
Message:

Change unescaping function in scanner and string.c to NOT unescape when '%' is not followed by hex digits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib-util/src/pjlib-util/string.c

    r67 r654  
    3535 
    3636    while (src != end) { 
    37         if (*src == '%' && src < end-2) { 
     37        if (*src == '%' && src < end-2 && pj_isxdigit(*(src+1)) &&  
     38            pj_isxdigit(*(src+2)))  
     39        { 
    3840            *dst = (pj_uint8_t) ((pj_hex_digit_to_val(*(src+1)) << 4) +  
    3941                                 pj_hex_digit_to_val(*(src+2))); 
Note: See TracChangeset for help on using the changeset viewer.