memset in wrong place in modbus_mapping_new()

Bug #613531 reported by Dominic Storey on 2010-08-04
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Committed
Stéphane Raimbault

Bug Description

Looking at the source code in lieu of documentation (:-) ) I found that in modbus_mapping_new(), line 1818, you call malloc(), then memset() to clear the allocated memory (1820), then check to see if the malloc() was successful (1822). If malloc() fails, wont the memset() cause a core dump?

Stéphane Raimbault (sra) wrote :

Already fixed on master branch!

Changed in libmodbus:
status: New → Invalid
status: Invalid → Fix Committed
importance: Undecided → Medium
assignee: nobody → Stéphane Raimbault (sra)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers