Commit 1fb3f7f2 authored by Nia Alarie's avatar Nia Alarie Committed by Samuel Thibault
Browse files

net/slirp: Convert atoi to qemu_strtoi to allow error checking

parent 8ee2022b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);