diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2022-08-23 16:31:49 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-08-24 18:01:48 +0200 |
commit | cc287af173ca5fd154bc28be5c9babcb14ce4363 (patch) | |
tree | 58f965756302ac2d973b429e4c1f53ed832f7a0f /conf.c | |
parent | 7b710946b152fabab0f3c838e5518576beb9020c (diff) | |
download | passt-cc287af173ca5fd154bc28be5c9babcb14ce4363.tar passt-cc287af173ca5fd154bc28be5c9babcb14ce4363.tar.gz passt-cc287af173ca5fd154bc28be5c9babcb14ce4363.tar.bz2 passt-cc287af173ca5fd154bc28be5c9babcb14ce4363.tar.lz passt-cc287af173ca5fd154bc28be5c9babcb14ce4363.tar.xz passt-cc287af173ca5fd154bc28be5c9babcb14ce4363.tar.zst passt-cc287af173ca5fd154bc28be5c9babcb14ce4363.zip |
conf: Fix incorrect bounds checking for sock_path parameter
Looks like a copy-paste error where we're checking against the size of the
pcap field, rather than the sock_path field.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'conf.c')
-rw-r--r-- | conf.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1269,7 +1269,7 @@ void conf(struct ctx *c, int argc, char **argv) ret = snprintf(c->sock_path, UNIX_SOCK_MAX - 1, "%s", optarg); - if (ret <= 0 || ret >= (int)sizeof(c->pcap)) { + if (ret <= 0 || ret >= (int)sizeof(c->sock_path)) { err("Invalid socket path: %s", optarg); usage(argv[0]); } |