From Huzaifa Sidhpurwala of the Red Hat Security Response Team: Don't
free uninitialized memory. See also: bug 5652. svn path=/trunk/; revision=35791
This commit is contained in:
parent
8ee172d021
commit
0c9649929e
2
tshark.c
2
tshark.c
|
@ -2524,7 +2524,7 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
|
|||
int snapshot_length;
|
||||
wtap_dumper *pdh;
|
||||
int err;
|
||||
gchar *err_info;
|
||||
gchar *err_info = NULL;
|
||||
gint64 data_offset;
|
||||
char *save_file_string = NULL;
|
||||
gboolean filtering_tap_listeners;
|
||||
|
|
|
@ -806,12 +806,14 @@ pcapng_read_packet_block(FILE_T fh, pcapng_block_header_t *bh, pcapng_t *pn, wta
|
|||
pcapng_debug2("pcapng_read_packet_block:cap_len %d is larger than packet_len %u.",
|
||||
wblock->data.packet.cap_len, wblock->data.packet.packet_len);
|
||||
*err = WTAP_ERR_BAD_RECORD;
|
||||
*err_info = strdup("pcapng_read_packet_block:cap_len is larger than packet_len");
|
||||
return 0;
|
||||
}
|
||||
if (wblock->data.packet.cap_len > WTAP_MAX_PACKET_SIZE) {
|
||||
pcapng_debug2("pcapng_read_packet_block:cap_len %d is larger than WTAP_MAX_PACKET_SIZE %u.",
|
||||
wblock->data.packet.cap_len, WTAP_MAX_PACKET_SIZE);
|
||||
*err = WTAP_ERR_BAD_RECORD;
|
||||
*err_info = strdup("pcapng_read_packet_block:cap_len is larger than WTAP_MAX_PACKET_SIZE");
|
||||
return 0;
|
||||
}
|
||||
pcapng_debug3("pcapng_read_packet_block: packet data: packet_len %u captured_len %u interface_id %u",
|
||||
|
|
Loading…
Reference in New Issue