Hi Taro Yamada, On 13 December 2016 at 11:18, <archer_ame@xxxxxxxxxxx> wrote: > From: Taro Yamada <archer_ame@xxxxxxxxxxx> > > 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. > 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 nice ^_^ Reviewed-by: Emil Velikov <emil.l.velikov@xxxxxxxxx> Barring any objections I'll commit this in a few days. Thanks Emil _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel