From: Blue Swirl <blauwirbel@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [5529] Use snprintf to please OpenBSD linker
Date: Sat, 25 Oct 2008 11:18:15 +0000 [thread overview]
Message-ID: <E1Kth9r-0006C8-2H@cvs.savannah.gnu.org> (raw)
Revision: 5529
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5529
Author: blueswir1
Date: 2008-10-25 11:18:12 +0000 (Sat, 25 Oct 2008)
Log Message:
-----------
Use snprintf to please OpenBSD linker
Modified Paths:
--------------
trunk/gdbstub.c
Modified: trunk/gdbstub.c
===================================================================
--- trunk/gdbstub.c 2008-10-25 00:10:20 UTC (rev 5528)
+++ trunk/gdbstub.c 2008-10-25 11:18:12 UTC (rev 5529)
@@ -1050,12 +1050,12 @@
if (!target_xml[0]) {
GDBRegisterState *r;
- sprintf(target_xml,
- "<?xml version=\"1.0\"?>"
- "<!DOCTYPE target SYSTEM \"gdb-target.dtd\">"
- "<target>"
- "<xi:include href=\"%s\"/>",
- GDB_CORE_XML);
+ snprintf(target_xml, sizeof(target_xml),
+ "<?xml version=\"1.0\"?>"
+ "<!DOCTYPE target SYSTEM \"gdb-target.dtd\">"
+ "<target>"
+ "<xi:include href=\"%s\"/>",
+ GDB_CORE_XML);
for (r = env->gdb_regs; r; r = r->next) {
strcat(target_xml, "<xi:include href=\"");
@@ -1426,7 +1426,7 @@
}
#endif
if (strncmp(p, "Supported", 9) == 0) {
- sprintf(buf, "PacketSize=%x", MAX_PACKET_LENGTH);
+ snprintf(buf, sizeof(buf), "PacketSize=%x", MAX_PACKET_LENGTH);
#ifdef GDB_CORE_XML
strcat(buf, ";qXfer:features:read+");
#endif
@@ -1442,7 +1442,7 @@
p += 19;
xml = get_feature_xml(env, p, &p);
if (!xml) {
- sprintf(buf, "E00");
+ snprintf(buf, sizeof(buf), "E00");
put_packet(s, buf);
break;
}
@@ -1456,7 +1456,7 @@
total_len = strlen(xml);
if (addr > total_len) {
- sprintf(buf, "E00");
+ snprintf(buf, sizeof(buf), "E00");
put_packet(s, buf);
break;
}
reply other threads:[~2008-10-25 11:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E1Kth9r-0006C8-2H@cvs.savannah.gnu.org \
--to=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).