]> git.ipfire.org Git - thirdparty/qemu.git/commit
slirp: check sscanf result when emulating ident
authorWilliam Bowling <will@wbowling.info>
Fri, 1 Mar 2019 21:45:56 +0000 (21:45 +0000)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 28 Mar 2019 01:11:30 +0000 (20:11 -0500)
commit83cd9ed3d701bd60cdb3ca020d6ce4ed32eba880
tree652ff1a8118d83234eda4b1339f71c21089c5107
parentc6f25642e01f9dd435dfc1ffe7a8d4350f2536c7
slirp: check sscanf result when emulating ident

When emulating ident in tcp_emu, if the strchr checks passed but the
sscanf check failed, two uninitialized variables would be copied and
sent in the reply, so move this code inside the if(sscanf()) clause.

Signed-off-by: William Bowling <will@wbowling.info>
Cc: qemu-stable@nongnu.org
Cc: secalert@redhat.com
Message-Id: <1551476756-25749-1-git-send-email-will@wbowling.info>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
(cherry picked from commit d3222975c7d6cda9e25809dea05241188457b113)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
slirp/tcp_subr.c