diff options
author | Thomas Huth <thuth@redhat.com> | 2019-08-26 14:50:17 +0200 |
---|---|---|
committer | Alexey Kardashevskiy <aik@ozlabs.ru> | 2019-08-27 12:00:36 +1000 |
commit | eeed8a10a8dfcd3a1469066406e56b4bd91cdef2 (patch) | |
tree | f3606197eef0df9b89d1414ae42917c6373c93fa | |
parent | 44d06f9e68cfc23f4316f0d5d3738c98f0403277 (diff) | |
download | SLOF-eeed8a10a8dfcd3a1469066406e56b4bd91cdef2.zip SLOF-eeed8a10a8dfcd3a1469066406e56b4bd91cdef2.tar.gz SLOF-eeed8a10a8dfcd3a1469066406e56b4bd91cdef2.tar.bz2 |
libnet: Fix the check of the argument lengths of the "ping" command
The current if-condition can never be true.
Buglink: https://bugs.launchpad.net/qemu/+bug/1840646
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
-rw-r--r-- | lib/libnet/ping.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libnet/ping.c b/lib/libnet/ping.c index 051269f..51db061 100644 --- a/lib/libnet/ping.c +++ b/lib/libnet/ping.c @@ -119,7 +119,7 @@ int ping(char *args_fs, int alen) memset(&ping_args, 0, sizeof(struct ping_args)); - if (alen <= 0 && alen >= sizeof(args) - 1) { + if (alen <= 0 || alen >= sizeof(args) - 1) { usage(); return -1; } |