Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-4721

JSON parser does not handle \u0000 properly

    Details

      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;

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sasha Alexander Vladishev
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: