ZABBIX BUGS AND ISSUES

JSON parser does not handle \u0000 properly

Details

  • Zabbix ID:
    Reviewed 2.0

Description

Given an esc in text gets translated to \u001b but when transforming back to txt becomes ^Ab
 
*** distro/src/libs/zbxjson/json.c Sat Sep 10 03:10:56 2011
--- distro_patched/src/libs/zbxjson/json.c Tue Feb 21 12:52:38 2012
***************
*** 705,711 ****
                                                *o++ = '\t';
                                                break;
                                        case 'u':
! p += 2; /* "00" */
                                                c = zbx_hex2num(*p++) << 4;
                                                c += zbx_hex2num(*p);
                                                *o++ = (char)c;
--- 705,711 ----
                                                *o++ = '\t';
                                                break;
                                        case 'u':
! p += 3; /* "U00" REA */
                                                c = zbx_hex2num(*p++) << 4;
                                                c += zbx_hex2num(*p);
                                                *o++ = (char)c;

Activity

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: