mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
qemu-sockets: Fix buffer overflow in inet_parse()
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>
This commit is contained in:
committed by
Michael Tokarev
parent
02f292d905
commit
55a1099603
+1
-1
@@ -512,7 +512,7 @@ InetSocketAddress *inet_parse(const char *str, Error **errp)
|
||||
{
|
||||
InetSocketAddress *addr;
|
||||
const char *optstr, *h;
|
||||
char host[64];
|
||||
char host[65];
|
||||
char port[33];
|
||||
int to;
|
||||
int pos;
|
||||
|
||||
Reference in New Issue
Block a user