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

Function is_uint_suffix() does not recognize "0" as a valid unsigned integer

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 2.0.6rc1, 2.1.0
    • 2.0.5, 2.1.0
    • Proxy (P), Server (S)
    • None

      If the first character in a string is '0', then function is_uint_suffix() returns FAIL.
      Thus, strings like "0", "01", "0123", "00000" are not recognized as valid unsigned integers.

      I think it can be fixed by replacing
      if ('\0' == *str || '1' > *str || *str > '9')
      with
      if ('\0' == *str || '0' > *str || *str > '9')
      in is_uint_suffix() implementation in file src/libs/zbxcommon/misc.c.

            Unassigned Unassigned
            andris Andris Mednis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: