diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-06-04 11:01:56 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-06-04 11:01:56 -0700 |
commit | 94cabd50c3010fa74f79296a4df561d52e68d800 (patch) | |
tree | 771bbc3f7fdef5f781994b403d12c7887ebd4b71 /savefile.c | |
parent | e6635880c81d45e86d2ddb961c20a8e47e7ab7ee (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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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"); |