aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/call-graph-from-postgresql.py
diff options
context:
space:
mode:
authorXiubo Li <[email protected]>2016-06-02 10:59:56 +0800
committerPablo Neira Ayuso <[email protected]>2016-06-23 12:13:06 +0200
commita6d0bae14858a43ab9d76d6332d7c3f2a618a6a2 (patch)
tree934019b39ad601725e3c8ae1e75e1f334fa6865c /tools/perf/scripts/python/call-graph-from-postgresql.py
parent436a850dd9cac09bf88e12e20cc79408b1d29788 (diff)
netfilter: x_tables: fix possible ZERO_SIZE_PTR pointer dereferencing error.
Since we cannot make sure that the 'hook_mask' will always be none zero here. If it equals to zero, the num_hooks will be zero too, and then kmalloc() will return ZERO_SIZE_PTR, which is (void *)16. Then the following error check will fails: ops = kmalloc(sizeof(*ops) * num_hooks, GFP_KERNEL); if (ops == NULL) return ERR_PTR(-ENOMEM); So this patch will fix this with just doing the zero check before kmalloc() is called. Maybe the case above will never happen here, but in theory. Signed-off-by: Xiubo Li <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions