projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
161717d
)
Fix OpenBSD linker warning
author
Blue Swirl
<blauwirbel@gmail.com>
Tue, 23 Feb 2010 22:01:36 +0000
(22:01 +0000)
committer
Blue Swirl
<blauwirbel@gmail.com>
Tue, 23 Feb 2010 22:01:36 +0000
(22:01 +0000)
helper.o(.text+0x11e0): In function `listflags':
/src/qemu/target-i386/helper.c:661: warning: sprintf() is often misused, please use snprintf()
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-i386/helper.c
patch
|
blob
|
history
diff --git
a/target-i386/helper.c
b/target-i386/helper.c
index 57e6f7c80657096b929363a33d92177b529768dc..080d2b8c7d35551ee8041d9e9ad8ab720c0db6cf 100644
(file)
--- a/
target-i386/helper.c
+++ b/
target-i386/helper.c
@@
-657,8
+657,9
@@
static void listflags(char *buf, int bufsize, uint32_t fbits,
else
nc = snprintf(q, bufsize, "%s[%d]", q == buf ? "" : " ", bit);
if (bufsize <= nc) {
- if (b)
- sprintf(b, "...");
+ if (b) {
+ memcpy(b, "...", sizeof("..."));
+ }
return;
}
q += nc;