This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/16013] gdb-7.6.1/gdb/common/linux-osdata.c: 5 * off by one error ?
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 23 Oct 2013 13:14:26 +0000
- Subject: [Bug gdb/16013] gdb-7.6.1/gdb/common/linux-osdata.c: 5 * off by one error ?
- Auto-submitted: auto-generated
- References: <bug-16013-4717 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=16013
--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
via 0a75c11540af8e7675a98694ede350f03abc2576 (commit)
from 5db606db9b6c6083b619a76556587852a0a0f392 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0a75c11540af8e7675a98694ede350f03abc2576
commit 0a75c11540af8e7675a98694ede350f03abc2576
Author: Gary Benson <gbenson@redhat.com>
Date: Wed Oct 23 13:58:26 2013 +0100
Fix off-by-one errors in *scanf format strings.
In the first hunk, the format string was off-by-one for cmd, and cmd
itself was larger than the maximum size required. cmd was reduced in
size and the format string adjusted.
In the second hunk, the format string was off-by-one for local_address,
remote_address and extra, although the buffers for the two addresses
were large enough for this not to matter. The specifiers for the two
addresses was corrected, and a number of unused variables including
extra were suppressed from parsing.
In the third hunk, the format string was off-by-one for name,
dependencies and status. This code was rewritten using strtok since
dependencies can be arbitrarily long.
gdb/
2013-10-23 Gary Benson <gbenson@redhat.com>
PR 16013
* common/linux-osdata.c (command_from_pid): Reduced size of cmd
from 32 to 18. Adjusted fscanf format string accordingly.
(Avoids leaving cmd unterminated.)
(print_sockets): Do not parse tlen, inode, sl, timeout, txq, rxq,
trun, retn or extra. (Avoids leaving extra unterminated.) Check
that local_address and remote_address will not overflow.
(linux_xfer_osdata_modules): Parse lines using strtok to avoid
leaving dependencies unterminated. Parse size as "%u" to match
definition.
-----------------------------------------------------------------------
Summary of changes:
gdb/ChangeLog | 13 +++++++++
gdb/common/linux-osdata.c | 66 ++++++++++++++++++++++++++++-----------------
2 files changed, 54 insertions(+), 25 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.