drm: NULL pointer dereference [null-pointer-deref] (CWE 476) problem
authorJoe Moriarty <joe.moriarty@oracle.com>
Mon, 12 Feb 2018 19:51:43 +0000 (14:51 -0500)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 19 Feb 2018 12:01:20 +0000 (13:01 +0100)
commita5ef65673667fc37ffa55884915f953cb5cc3b3e
treebae1bfcc065bd8a7757843b714b78375a3ea811a
parent22a07038c0eaf4d1315a493ce66dcd255accba19
drm: NULL pointer dereference [null-pointer-deref] (CWE 476) problem

The Parfait (version 2.1.0) static code analysis tool found the
following NULL pointer derefernce problem.

- drivers/gpu/drm/drm_edid.c
The call to drm_cvt_mode() in function drm_mode_std() for the
HDTV hack resulted in the possibility of accessing a NULL pointer
if drm_mode_std() returned NULL.  A check for this added right after
the call to drm_cvt_mode() in this particular area of code.

Signed-off-by: Joe Moriarty <joe.moriarty@oracle.com>
Reviewed-by: Steven Sistare <steven.sistare@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180212195144.98323-4-joe.moriarty@oracle.com
drivers/gpu/drm/drm_edid.c