diff options
| author | Jia-Ju Bai <[email protected]> | 2019-07-24 17:04:26 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2019-07-25 13:21:15 +0200 |
| commit | 7bdd9695970eb8cd5b987e08f99cb8f0c84f30fd (patch) | |
| tree | bfa33fca2a670b52ce2cff43f73c4474eed44b04 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 092f47c383adbff4d873dcb7f0887954bd407a08 (diff) | |
char: ppdev: Fix a possible null-pointer dereference in pp_release()
In pp_release(), there is an if statement on line 730 to check whether
pp->pdev is NULL:
else if ((pp->flags & PP_CLAIMED) && pp->pdev && ...)
When pp->pdev is NULL, it is used on line 743:
info = &pp->pdev->port->ieee1284;
and on line 748:
parport_release(pp->pdev);
Thus, a possible null-pointer dereference may occur.
To fix this bug, pp->pdev is checked on line 740.
This bug is found by a static analysis tool STCheck written by us.
Signed-off-by: Jia-Ju Bai <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions