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

dangerous code for define with + or -

    XMLWordPrintable

Details

    • Incident report
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.9
    • 2.1.9
    • Server (S)
    • None

    Description

      There are many dangerous in Zabbix any versions.

      For example, in include/db.h
      #define TRIGGER_EXPRESSION_LEN_MAX TRIGGER_EXPRESSION_LEN+1

      It should be with bracket () like following
      #define TRIGGER_EXPRESSION_LEN_MAX (TRIGGER_EXPRESSION_LEN+1)

      The reason is following
      int a = TRIGGER_EXPRESSION_LEN_MAX * 4;

      The programer think a is TRIGGER_EXPRESSION_LEN * 4 + 4. But a is TRIGGER_EXPRESSION_LEN + 4.
      It is just amateurs' miss!

      Attachments

        Activity

          People

            Unassigned Unassigned
            daiki.matsuda@miraclelinux.com MATSUDA Daiki
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: