Message ID | 20180531192237.3994-6-samuel.thibault@ens-lyon.org |
---|---|
State | New |
Headers | show |
Series | None | expand |
diff --git a/net/slirp.c b/net/slirp.c index 005c2675e6..1e14318b4d 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -492,7 +492,9 @@ void hmp_hostfwd_remove(Monitor *mon, const QDict *qdict) goto fail_syntax; } - host_port = atoi(p); + if (qemu_strtoi(p, NULL, 10, &host_port)) { + goto fail_syntax; + } err = slirp_remove_hostfwd(s->slirp, is_udp, host_addr, host_port);