uefirtvariable.c - Declared variable-length array (VLA) has zero size

Bug #1526815 reported by Colin Ian King
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Firmware Test Suite
Fix Released
High
Ivan Hu

Bug Description

setvariable_insertvariable() declares data[datasize], however, in line 1657 it is called as follows:

ret = setvariable_insertvariable(fw, attributes, 0, variablenametest, &gtestguid1, datadiff);

..so datasize is zero, which means data is a zero sized array, which looks bogus to me. This was picked up by clang's static analysis tool scan-build.

Changed in fwts:
importance: Undecided → High
assignee: nobody → Ivan Hu (ivan.hu)
description: updated
Ivan Hu (ivan.hu)
Changed in fwts:
status: New → In Progress
Revision history for this message
Ivan Hu (ivan.hu) wrote :
Changed in fwts:
milestone: none → 16.01.00
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.