aboutsummaryrefslogtreecommitdiff
path: root/savefile.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-06-04 11:01:56 -0700
committerGuy Harris <guy@alum.mit.edu>2016-06-04 11:01:56 -0700
commit94cabd50c3010fa74f79296a4df561d52e68d800 (patch)
tree771bbc3f7fdef5f781994b403d12c7887ebd4b71 /savefile.c
parente6635880c81d45e86d2ddb961c20a8e47e7ab7ee (diff)
Pass a pointer to the length to the OID get/set routines.
An OID get request may return less data than requested; pass a pointer to the length to pcap_oid_get_request(), so that it can supply the amount of data actually supplied. It also appears that a set request may copy less data than supplied, so do the same for pcap_oid_set_request().
Diffstat (limited to 'savefile.c')
-rw-r--r--savefile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/savefile.c b/savefile.c
index 5d9429c4..2d2c75a2 100644
--- a/savefile.c
+++ b/savefile.c
@@ -169,7 +169,7 @@ sf_getevent(pcap_t *pcap)
static int
sf_oid_get_request(pcap_t *p, bpf_u_int32 oid _U_, void *data _U_,
- size_t len _U_)
+ size_t *len _U_)
{
pcap_snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
"An OID get request cannot be performed on a file");
@@ -178,7 +178,7 @@ sf_oid_get_request(pcap_t *p, bpf_u_int32 oid _U_, void *data _U_,
static int
sf_oid_set_request(pcap_t *p, bpf_u_int32 oid _U_, const void *data _U_,
- size_t len _U_)
+ size_t *len _U_)
{
pcap_snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
"An OID set request cannot be performed on a file");