Re: [PATCH] drm_edid-load: Fix a missing-check bug in drm_load_edid_firmware()

2019-05-24 Thread Jani Nikula
On Fri, 24 May 2019, Gen Zhang wrote: > In drm_load_edid_firmware(), fwstr is allocated by kstrdup(). And fwstr > is dereferenced in the following codes. However, memory allocation > functions such as kstrdup() may fail and returns NULL. Dereferencing > this null pointer may cause the kernel go

[PATCH] drm_edid-load: Fix a missing-check bug in drm_load_edid_firmware()

2019-05-23 Thread Gen Zhang
In drm_load_edid_firmware(), fwstr is allocated by kstrdup(). And fwstr is dereferenced in the following codes. However, memory allocation functions such as kstrdup() may fail and returns NULL. Dereferencing this null pointer may cause the kernel go wrong. Thus we should check this kstrdup()