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>
This commit is contained in:
parent
44d06f9e68
commit
eeed8a10a8
|
@ -119,7 +119,7 @@ int ping(char *args_fs, int alen)
|
||||||
|
|
||||||
memset(&ping_args, 0, sizeof(struct ping_args));
|
memset(&ping_args, 0, sizeof(struct ping_args));
|
||||||
|
|
||||||
if (alen <= 0 && alen >= sizeof(args) - 1) {
|
if (alen <= 0 || alen >= sizeof(args) - 1) {
|
||||||
usage();
|
usage();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue