OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02f292d
)
qemu-sockets: Fix buffer overflow in inet_parse()
author
Kevin Wolf
<kwolf@redhat.com>
Fri, 30 Jan 2015 19:37:55 +0000
(20:37 +0100)
committer
Michael Tokarev
<mjt@tls.msk.ru>
Tue, 10 Feb 2015 06:27:20 +0000
(09:27 +0300)
The size of the stack allocated host[] array didn't account for the
terminating '\0' byte that sscanf() writes. Fix the array size.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
util/qemu-sockets.c
patch
|
blob
|
history
diff --git
a/util/qemu-sockets.c
b/util/qemu-sockets.c
index
cf4b91f
..
61fc3c1
100644
(file)
--- a/
util/qemu-sockets.c
+++ b/
util/qemu-sockets.c
@@
-512,7
+512,7
@@
InetSocketAddress *inet_parse(const char *str, Error **errp)
{
InetSocketAddress *addr;
const char *optstr, *h;
- char host[6
4
];
+ char host[6
5
];
char port[33];
int to;
int pos;