From Robert Bullen: Fix for: Two minor bugs in Wiretap library:
First bug: The Network Instruments Observer file format abbreviation is incorrect. It is "niobserverv" instead of "niobserver", which is probably a vestige from 1.4 when the abbreviation was "niobserverv9". Second bug: The packet header magic number field is correctly swapped the first time when reading the entire packet header. It is incorrectly swapped yet again when reporting an invalid value. Both swaps use GUINT_FROM_LE, which is a no-op on little-endian platforms. But the error message that is displayed to users of big-endian platforms will contain a byte-reversed value. svn path=/trunk/; revision=39392
This commit is contained in:
parent
5bcc7450ee
commit
59e64cff77
|
@ -537,7 +537,7 @@ static const struct file_type_info dump_open_table_base[] = {
|
|||
netxray_dump_can_write_encap_2_0, netxray_dump_open_2_0 },
|
||||
|
||||
/* WTAP_FILE_NETWORK_INSTRUMENTS */
|
||||
{ "Network Instruments Observer", "niobserverv", "*.bfr", ".bfr", FALSE, FALSE,
|
||||
{ "Network Instruments Observer", "niobserver", "*.bfr", ".bfr", FALSE, FALSE,
|
||||
network_instruments_dump_can_write_encap, network_instruments_dump_open },
|
||||
|
||||
/* WTAP_FILE_LANALYZER */
|
||||
|
|
|
@ -447,7 +447,7 @@ read_packet_header(FILE_T fh, packet_entry_header *packet_header, int *err,
|
|||
|
||||
*err = WTAP_ERR_BAD_RECORD;
|
||||
*err_info = g_strdup_printf("Observer: bad record: Invalid magic number 0x%08x",
|
||||
GUINT32_FROM_LE(packet_header->packet_magic));
|
||||
packet_header->packet_magic);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue