[PATCH libdrm] xf86drm: fix null termination of string buffer

2016-12-14 Thread Taro Yamada
On 12/14/2016 12:23 PM, Emil Velikov wrote: > Did you see this causing issues in practise ? > > We use a combination of strstr to strip any unwanted starting data, > and sscanf which [should] trim any trailing garbage. > That aside, your patch provides an extra bit of robustness which is > always n

[PATCH libdrm] xf86drm: fix null termination of string buffer

2016-12-14 Thread Emil Velikov
Hi Taro Yamada, On 13 December 2016 at 11:18, wrote: > From: Taro Yamada > > 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

[PATCH libdrm] xf86drm: fix null termination of string buffer

2016-12-13 Thread archer_...@yahoo.co.jp
From: Taro Yamada 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 chang

[PATCH libdrm] xf86drm: fix null termination of string buffer

2016-12-13 Thread archer_...@yahoo.co.jp
From: Taro Yamada 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 chang