summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
diff options
context:
space:
mode:
authorMichal Nazarewicz <mina86@mina86.com>2014-06-17 17:47:41 +0200
committerFelipe Balbi <balbi@ti.com>2014-06-19 10:06:47 -0500
commitf0688c8b81d2ea239c3fb0b848f623b579238d99 (patch)
tree4a5ffe092c8c190a23de81b98e1db5a80ee094eb /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
parent82363cf2eeafeea6ba88849f5e2febdc8a05943f (diff)
usb: gadget: f_fs: fix NULL pointer dereference when there are no strings
If the descriptors do not need any strings and user space sends empty set of strings, the ffs->stringtabs field remains NULL. Thus *ffs->stringtabs in functionfs_bind leads to a NULL pointer dereferenece. The bug was introduced by commit [fd7c9a007f: “use usb_string_ids_n()”]. While at it, remove double initialisation of lang local variable in that function. ffs->strings_count does not need to be checked in any way since in the above scenario it will remain zero and usb_string_ids_n() is a no-operation when colled with 0 argument. Cc: <stable@vger.kernel.org> # v2.6.36+ Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions