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

Heap corruption in function: 'zbx_mutex_create_per_process_name' within the 'mutexs.c' source file

    Details

    • Team:
      Team A
    • Sprint:
      Sprint 15, Sprint 16
    • Story Points:
      3

      Description

      I was compiling the source code using the Windows NMake file and added the /MTd switch instead of the /MT compiler switch so I could debug the source code. When I tried to run the code then I encountered a heap corruption. I tracked the issue down to the zbx_mutex_create_per_process_name function in the src/libs/zbxsys/mutexs.c source file. You can see how I did it in the attached source file. I also corrected the issue and commented out the original line. According to the Microsoft documentation (https://msdn.microsoft.com/en-us/library/f30dzcf6.aspx) the second parameter of the _snwprintf_s function is the count of characters and not the size of the buffer in bytes.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Nihilius Ronnie Kaech
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: