Skip to content
Commit 5799d9e2 authored by Jim Meyering's avatar Jim Meyering Committed by Dave Airlie
Browse files

drm/nouveau/pm: don't read/write beyond end of stack buffer



NUL-terminate after strncpy.

If the parameter "profile" has length 16 or more, then strncpy
leaves "string" with no NUL terminator, so the following search
for '\n' may read beyond the end of that 16-byte buffer.
If it finds a newline there, then it will also write beyond the
end of that stack buffer.

Signed-off-by: default avatarJim Meyering <meyering@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 5edaad87
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment