diff options
Diffstat (limited to 'net/slirp.c')
-rw-r--r-- | net/slirp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/slirp.c b/net/slirp.c index 99884de204..da6c0a1a5c 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -350,6 +350,15 @@ static int net_slirp_init(NetClientState *peer, const char *model, return -1; } + if (vdomainname && strlen(vdomainname) > 255) { + error_setg(errp, "'domainname' parameter cannot exceed 255 bytes"); + return -1; + } + + if (vhostname && strlen(vhostname) > 255) { + error_setg(errp, "'vhostname' parameter cannot exceed 255 bytes"); + return -1; + } nc = qemu_new_net_client(&net_slirp_info, peer, model, name); |