[Bug 99045] The string passed to sscanf() contains an uninitialized value.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bug ID 99045
Summary The string passed to sscanf() contains an uninitialized value.
Product DRI
Version unspecified
Hardware Other
OS Linux (All)
Status NEW
Severity normal
Priority medium
Component libdrm
Assignee dri-devel@lists.freedesktop.org
Reporter archer_ame@yahoo.co.jp

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"


You are receiving this mail because:
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux