Created attachment 128403 [details] [review] Patch to fix null termination. The function drmParsePciBusInfo() in xf86drm.c reads the contents of the file "/sys/dev/char/x:y/device/uevent" into the buffer. The string written to the buffer by read() is not null-terminated, but this function is writing null only at the end of the buffer. As a result, the string passed to sscanf() contains an uninitialized value and sscanf uses it. For example, The string that should be passed to sscanf(). "The contents of the file\0" The string actually passed to sscanf(). "The contents of the file and uninitialized value until the end of the buffer\0"
Hi Taro Yamada, please git send-email patches to dri-devel@lists.freedesktop.org. If you can set the prefix that'll be even better ;-) $ git config --local format.subjectPrefix "PATCH libdrm"
Thanks for reply. I've tried.
Just pushed the patch to master. Thanks !
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.