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

dangerous code for define with + or -

XMLWordPrintable

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

      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!

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

              Created:
              Updated:
              Resolved: