]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
dfu:function: Fix number of allocated DFU function pointers
authorLukasz Majewski <l.majewski@samsung.com>
Wed, 26 Jun 2013 09:46:13 +0000 (11:46 +0200)
committerMarek Vasut <marex@denx.de>
Sun, 30 Jun 2013 16:41:08 +0000 (18:41 +0200)
commite059a400ad780328cd5ad22c396298cac520c856
tree8576ec1b6d6b7287a9a2ef05e8f3454a7f3236d1
parent7a3427854243f0e28c102926d203709b3e3cee62
dfu:function: Fix number of allocated DFU function pointers

This subtle change fix problem with too small amount of allocated
memory to store DFU function pointers.

One needs to allocate extra space for sentinel NULL pointer in this array
of function pointers.

With the previous code, the NULL value overwrites malloc internal data
and afterwards free(f_dfu->function) crashes.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marex@denx.de>
drivers/usb/gadget/f_dfu.c