drm: i915: Avoid format string expansion from engine names
Subsystems (2)
PATCH 1/1 drm: i915: Avoid format string expansion from engine names
While highly unlikely, this makes sure that the string built from engine names won't be processed as a format string.
Signed-off-by Kees Cook <[email protected]>
--- drivers/gpu/drm/i915/intel_hangcheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_hangcheck.c +1 -1
@@ -407,7 +407,7 @@ static void hangcheck_declare_hang(struct drm_i915_private *i915, "%s, ", engine->name); msg[len-2 ] ='\0' ; -return i915_handle_error (i915, hung, msg); +return i915_handle_error (i915, hung,"%s" , msg); }/*
Signature · 10 lines
2.7.4 -- Kees Cook Pixel Security _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 4 lines · Kees Cook
While highly unlikely, this makes sure that the string built from engine names won't be processed as a format string.
Signed-off-by Kees Cook <[email protected]>
Pushed to drm-intel-next-queued, thanks for the patch.
BR,
Jani.
Quoted 19 lines
--- drivers/gpu/drm/i915/intel_hangcheck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_hangcheck.c +1
-1@@ -407,7 +407,7 @@ static void hangcheck_declare_hang(struct drm_i915_private *i915, "%s, ", engine->name); msg[len-2 ] ='\0' ; -return i915_handle_error (i915, hung, msg); +return i915_handle_error (i915, hung,"%s" , msg); }/* Signature · 1 line
2.7.4
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel