OSDN Git Service

drm/dp: Don't trust drm_dp_downstream_id()
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 20 Jul 2017 17:45:32 +0000 (18:45 +0100)
committerJani Nikula <jani.nikula@intel.com>
Fri, 21 Jul 2017 14:45:26 +0000 (17:45 +0300)
commit967003bb2cae121d345fd807eb757d9422229713
tree1cf7ce3b548fd15af9c564d7bd2c0a5d6306ce99
parentc11a93f5fd9229dc7c8b90570c75cf70bc3976c2
drm/dp: Don't trust drm_dp_downstream_id()

Before we interpret drm_dp_downstream_id() as a string, make sure it is
NULL terminated, even when drm_dp_downtsream_id() fails.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101660
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170720174532.23377-2-chris@chris-wilson.co.uk
drivers/gpu/drm/drm_dp_helper.c