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

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0.5, 2.1.0
    • Fix Version/s: 2.0.6rc1, 2.1.0
    • Component/s: Proxy (P), Server (S)
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: