pcapng: Fixed copying if_filter_bpf_bytes

Bug: 11455
Change-Id: Ic99ff1bcd7dad65b3ade5a9f46ce0f64573cb059
Reviewed-on: https://code.wireshark.org/review/10147
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
This commit is contained in:
Stig Bjørlykke 2015-08-20 13:00:24 +02:00 committed by Hadriel Kaplan
parent 8a7186791c
commit 72497918b1
1 changed files with 1 additions and 1 deletions

View File

@ -950,7 +950,7 @@ pcapng_read_if_descr_block(wtap *wth, FILE_T fh, pcapng_block_header_t *bh,
} else if (option_content[0] == 1) {
wblock->data.if_descr.bpf_filter_len = oh.option_length-1;
wblock->data.if_descr.if_filter_bpf_bytes = (gchar *)g_malloc(oh.option_length-1);
memcpy(&wblock->data.if_descr.if_filter_bpf_bytes, (char *)option_content+1, oh.option_length-1);
memcpy(wblock->data.if_descr.if_filter_bpf_bytes, (char *)option_content+1, oh.option_length-1);
}
} else {
pcapng_debug1("pcapng_read_if_descr_block: if_filter length %u seems strange", oh.option_length);