From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 99045] The string passed to sscanf() contains an uninitialized value.
Date: Sat, 10 Dec 2016 11:57:07 +0000 [thread overview]
Message-ID: <bug-99045-502@http.bugs.freedesktop.org/> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1305 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=99045
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
--> https://bugs.freedesktop.org/attachment.cgi?id=128403&action=edit
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:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2861 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2016-12-10 11:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-10 11:57 bugzilla-daemon [this message]
2016-12-12 13:54 ` [Bug 99045] The string passed to sscanf() contains an uninitialized value bugzilla-daemon
2016-12-13 8:59 ` bugzilla-daemon
2017-01-16 14:45 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-99045-502@http.bugs.freedesktop.org/ \
--to=bugzilla-daemon@freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.