Skip to content
Commit 4ecd1ef0 authored by Taro Yamada's avatar Taro Yamada Committed by Emil Velikov
Browse files

xf86drm: fix null termination of string buffer

The string written to the buffer by read() is not null-terminated,
but currently drmParsePciBusInfo() places null character only at the end of the buffer, not at the end of the
string.
As a result, the string passed to sscanf() contains an uninitialized value.

This patch changes to places null character at the end of the string.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99045


Signed-off-by: default avatarTaro Yamada <archer_ame@yahoo.co.jp>
Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
parent 44f220ad
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