commit | 5799d9e2eab20ef694fb92a7636f451e1b0e456c | [log] [tgz] |
---|---|---|
author | Jim Meyering <jim@meyering.net> | Tue Apr 17 21:27:54 2012 +0200 |
committer | Dave Airlie <airlied@redhat.com> | Thu Apr 19 14:38:54 2012 +0100 |
tree | 2146fbc6521a354b9194bc46954a394802a6e68e | |
parent | 5edaad87000a143504a8f8e2864bb415a9287d94 [diff] |
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: Jim Meyering <meyering@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>