* [Qemu-devel] [5529] Use snprintf to please OpenBSD linker
@ 2008-10-25 11:18 Blue Swirl
0 siblings, 0 replies; only message in thread
From: Blue Swirl @ 2008-10-25 11:18 UTC (permalink / raw)
To: qemu-devel
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-25 11:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-25 11:18 [Qemu-devel] [5529] Use snprintf to please OpenBSD linker Blue Swirl
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).