Commit Graph

2531 Commits

Author SHA1 Message Date
Guy Harris 65303efe4d Remove some unneeded includes of <sys/time.h>.
Change-Id: I9e4e6efa9f8c7dbff7627f8d5fc3278ab383618d
Reviewed-on: https://code.wireshark.org/review/7441
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-28 04:59:08 +00:00
Guy Harris 3b235615bf Don't use struct timeval if we only care about seconds.
time_t suffices in that case.

Change-Id: Ica7a79fb6f8c7cc7fb6decd5fcd391dccfdb3fc6
Reviewed-on: https://code.wireshark.org/review/7440
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-28 03:50:26 +00:00
Guy Harris 60cc2e0e93 Clean up timestamp handling.
Use nstime_t rather than struct timeval when we want
seconds-and-fractions, so that, when writing the file, we can handle
nanosecond-resolution time stamps.  Calculate the relative time stamp as
a 64-bit integer rather than using floating-point.

Use time_t rather than struct timeval if we only want seconds.

Have the routines that write out 16-bit and 32-bit numbers convert them
to little-endian themselves, rather than having to be passed a
little-endian number.

Have a routine that writes out 48-bit values in little-endian order, and
use that to write out packet time stamps.

Change-Id: Ia6e047079e48915647502178e0a1c61177010c62
Reviewed-on: https://code.wireshark.org/review/7438
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-28 02:23:49 +00:00
Guy Harris 0692d75455 Make the V10 path a bit more like the other paths.
Provide {FULL,PART}SIZEDEFV10 macros, similar to what's provided for the
other versions, containing the code to set the packet length and
captured data length, and use the TRACE_V10_REC_LEN_OFF() macro directly
after that to set the various length and offset values in the
pseudo-header.

Change-Id: I3513371057601b44821d89ebaa7565ab370a67f5
Reviewed-on: https://code.wireshark.org/review/7393
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25 21:05:26 +00:00
Guy Harris 9dfade3494 Make the _offset values static constants.
No need to export them outside this file, and making them constants
might convince the compiler not to bother fetching their values from
memory when referring to them.

Change-Id: Ib8605bf0bb9091721a51827c45fe75d19a15ba26
Reviewed-on: https://code.wireshark.org/review/7378
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25 08:12:28 +00:00
Guy Harris 6b6c11c3c3 Have a PACKET_DESCRIBE() for V30's seek-read routine.
That way it'll set the captured length and reported length the same way
it's done in the read routine.

Change-Id: I8b1f2d0d8fa688f44b6f61f16dc2e21b5648fc12
Reviewed-on: https://code.wireshark.org/review/7376
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25 06:12:23 +00:00
Guy Harris 98e8d527c9 Make the V10 PACKET_DESCRIBE() macro a little more like the others.
Rename the V10 PACKET_DESCRIBE()'s "fpp" argument to "type", and have it
declare the pointer variable.

Change-Id: I3ac52ebdef0aec7bc95052277537185132886b57
Reviewed-on: https://code.wireshark.org/review/7374
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25 05:23:56 +00:00
Guy Harris 0856de5b5f Rename the "type" argument to V10's PACKET_DESCRIBE() to "ver".
Move it in the argument list, and use it instead of a hard-coded 10
(even though it's always passed as 10), to match the other
PACKET_DESCRIBE() macros.

Change-Id: Idd0a23a58cc6bb0d2de799b039db776d279cc03e
Reviewed-on: https://code.wireshark.org/review/7372
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25 04:25:43 +00:00
Guy Harris 825a833763 Call the version-number argument to GENERATE_CASE_xxx() "ver".
The name "type" is thrown around to mean both a version number and a
part of a structure member, and some other macros use "ver" for the
version number; try to make things a little less inconsistent.

Change-Id: I61405cf41cca43fe607154af7498944c5ec0ef11
Reviewed-on: https://code.wireshark.org/review/7370
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25 04:16:17 +00:00
Guy Harris fc6df642be Use FULL/PART as an argument to all PACKET_DESCRIBE() macros.
Makes the various flavors of that macro more similar.

Change-Id: Ie95ee8db0b226458146b055b54b7d61835f1e508
Reviewed-on: https://code.wireshark.org/review/7368
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25 03:13:02 +00:00
Guy Harris 22b4b6321b Get rid of an unused argument to PACKET_DESCRIBE().
Change-Id: Ic2037f5bf7eb43f93ba39f91bca3fc267c8fb850
Reviewed-on: https://code.wireshark.org/review/7366
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25 03:00:39 +00:00
Guy Harris 04b6b56228 Give all PACKET_DESCRIBE() macros a HEADERVER argument.
A bit of regularization.

Change-Id: I60e0bd50891e1ba3e9c40f8d1d14d63534e08138
Reviewed-on: https://code.wireshark.org/review/7364
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25 00:15:54 +00:00
Guy Harris 08c85ecc3c Call header version arguments HEADERVER.
Use that rather than TYPE or acttype (to indicate that it's a header
version number to use as the "xxx" in NSPR_HEADER_VERSIONxxx, and to use
the same name throughout).

Change-Id: I14cfc819e44ce4388c27d521a1256dec8d80df2e
Reviewed-on: https://code.wireshark.org/review/7361
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-25 00:07:15 +00:00
Guy Harris c4b76a94ef More indentation cleanups.
Change-Id: Ia448727e6340723800d92097f0ef7f3582ef6340
Reviewed-on: https://code.wireshark.org/review/7359
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-24 22:32:46 +00:00
Guy Harris 0dc5edfe95 Clean up indentation.
Change-Id: I80f8c5c642ebc1fe0169e39c1af9584cfbb89d1a
Reviewed-on: https://code.wireshark.org/review/7357
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-24 22:30:14 +00:00
Guy Harris 37c09e35b0 Pull more into PACKET_DESCRIBE() for the V10 seek-read routine.
Just like the read routine.

Change-Id: If6bd98bea15f1c8dc7454a5dac0ea57920bddc8c
Reviewed-on: https://code.wireshark.org/review/7355
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-24 22:22:42 +00:00
Guy Harris 592ee9e83b Swallow up more V10 stuff into PACKET_DESCRIBE().
That makes it even more like V2x and V3x and slightly less unclear.

Change-Id: I798ead123ba6418be0252067773a951390e26ce8
Reviewed-on: https://code.wireshark.org/review/7353
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-24 21:56:56 +00:00
Guy Harris 2a31311f81 Have PACKET_DESCRIBE() for V10.
Have it set the record type and initialize the presence bits.

That makes it a bit more like V2x and V3x, and makes the code slightly
less unclear.

Change-Id: Ibfbe2143b24a68c3fa3f576616fde81918b01feb
Reviewed-on: https://code.wireshark.org/review/7351
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-24 21:22:51 +00:00
Guy Harris fe5aea7c62 Move the setting of rec_type.
This makes the code slightly less unclear.  (You are in a maze of twisty
little C macros, all different.)

Change-Id: I9f1bcc7a9a1a7afe87ede8b1ba513e3d8e53845c
Reviewed-on: https://code.wireshark.org/review/7349
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-24 21:02:54 +00:00
ranushekhar c466d401d9 NS Trace (NetScaler Trace) file format is not able to export specified packets
Bug: 10998
Change-Id: Ic2c5ad5b01be3e0c39b1e93badcc4f2246c420fe
Reviewed-on: https://code.wireshark.org/review/7327
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-24 06:37:10 +00:00
Daniel Mack a6f4bdb874 pcap-common: fix build error with gcc5
gcc5 complains about the issue below, so add a trivial fixup.

  CC       libwiretap_la-pcap-common.lo
pcap-common.c: In function 'pcap_byteswap_nflog_pseudoheader':
pcap-common.c:1290:30: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
  if (!(nfhdr->nflog_version) == 0) {
                              ^
cc1: all warnings being treated as errors

Change-Id: I9f5b090ffd564f203cc3fb4ff302f2e4752865f0
Reviewed-on: https://code.wireshark.org/review/7336
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-24 00:26:41 +00:00
Guy Harris 99ff8baed6 Use file extensions even more as a heuristic.
If a file type has a list of "typical" extensions, and a file has an
extension that is *not* one of those extensions, the file is unlikely to
be of that type.

For files that have extensions, after we try the heuristics that have a
list of "typical" extensions that includes the file's extension, try the
heuristics that have no such list, and after that try the heuristics
that have such a list but where the list *doesn't* include the file's
extension.

This fixes, for example, some cases where non-PacketLogger files were
getting identified as PacketLogger files.

Change-Id: I2d8c3b983ed6ccd692beb888668f77eb9b5f437b
Reviewed-on: https://code.wireshark.org/review/7315
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-22 19:25:07 +00:00
Michal Labedzki 8e43698b52 Set phdr encap for pcap file
Change-Id: Id600b395d6fd2711c9b392a60454e5bd9a3eb465
Reviewed-on: https://code.wireshark.org/review/7288
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-21 17:19:51 +00:00
Guy Harris 7263af87c6 Eliminate some DIRTY_ file lists.
We don't want to encourage people to add to those lists, we want to
encourage people to subtract *from* those lists (either by fixing
warnings or, if an infelicitous API, or an infelicitous declaration of
an API on some platforms, or a program generator that doesn't take
sufficient care to avoid warnings - I'm looking at *you*, Flex - makes
it impossible to fix without introducing other problems, using the
DIAG_OFF()/DIAG_ON() macros if possible).  Eliminate the empty lists, to
make it harder to fill them up again.

Change-Id: I298d07952c0cb1842a4ea71ba7e07c68e94a04e9
Reviewed-on: https://code.wireshark.org/review/7229
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-18 08:04:32 +00:00
AndersBroman 9150a928d5 Add missing json.h
Change-Id: Ib1d67fdcc016532ab6e4140df357a6d0dd5cf09d
Reviewed-on: https://code.wireshark.org/review/7193
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-17 12:15:17 +00:00
Dario Lombardo bd911096bd Added JSON native file support.
libjsmn has also been moved from epan/ to wsutil/ to make it visible from wiretap.

Change-Id: I59abb3419acb1baa83194b38152d3651ed5c123c
Bug: 10878
Reviewed-on: https://code.wireshark.org/review/6716
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-02-17 11:08:51 +00:00
Guy Harris fea325d2ba Handle DLT_LOOP differently from DLT_NULL.
That's a little cleaner, and lets us preserve the LINKTYPE_ value for
DLT_LOOP captures.  ("Preserve" here doesn't mean "write files with a
link-layer header type of 12", as that's ambiguous; we write it with a
link-layer header type of LINKTYPE_LOOP, i.e. 108.  If programs on
OpenBSD don't recognize that as DLT_LOOP, that's a bug in OpenBSD's
libpcap or in the program.)

Change-Id: I48a2e04aed41c013823ffb5c588d2a8e8b376e15
Reviewed-on: https://code.wireshark.org/review/7143
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-15 22:47:03 +00:00
Guy Harris 1917023fc1 Don't base interpretation of LINKTYPE_ values on DLT_ value definitions.
Instead, explicitly check for particular build platforms.  This means
that the interpretation of the link-layer type values with different
meanings on different platforms won't be dependent on the particular
version of libpcap with which Wireshark happens to be built, and also
means that we don't have to fix pcap-common.c to include pcap.h or
net/bpf.h.

Fix some comments while we're at it.

Bug: 10956
Change-Id: If331d9b92081fb0bdf416620fb2ad8dce57dea6b
Reviewed-on: https://code.wireshark.org/review/7140
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-15 22:04:23 +00:00
Bill Meier 9c866ff971 Replace tabs by spaces when editor modelines has "expandtab"
Change-Id: If7a6f2697be732ae4f94ed8b845fd293c32510f7
Also: tabs-stops should be 8
Reviewed-on: https://code.wireshark.org/review/7100
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-13 17:34:53 +00:00
Gerald Combs 52b4059b11 1.99.2 → 1.99.3.
Change-Id: Id03d0243f20b33873a92be7444b61952d0b18638
Reviewed-on: https://code.wireshark.org/review/6956
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-04 21:03:24 +00:00
Gerald Combs a835c85e3d Pcapng: Don't fetch past the end of a GArray.
Due to an off-by-one error an invalid ISB interface ID could make us
fetch past the end of a GArray. Found using American Fuzzy Lop.

Bug: 10895
Change-Id: I7d4049ad7a386ae7e8013b8e741d54a31f353f1f
Reviewed-on: https://code.wireshark.org/review/6798
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-26 20:40:01 +00:00
Gerald Combs cf142c6b67 Get Wireshark to compile with afl-gcc.
Fix errors found by American Fuzzy Lop's afl-gcc
(http://lcamtuf.coredump.cx/afl/):

peektagged.c:
error: 'fileVersion' may be used uninitialized in this function

packet-h223.c:
error: variable 'circuit_id' might be clobbered by 'longjmp' or 'vfork'

wslua_proto.c:
error: variable 'd' might be clobbered by 'longjmp' or 'vfork'

wslua_proto.c:
error: variable 'dt' might be clobbered by 'longjmp' or 'vfork'

Change-Id: Idd74a3ad7b236d3a8756c1e7e917b1c74143f381
Reviewed-on: https://code.wireshark.org/review/6767
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-24 19:14:38 +00:00
Guy Harris 62ea3194ed PacketLogger files can be big-endian or little-endian.
Bug: 10861
Change-Id: Iedb248aa4a96e65bb525ba6475dc767e5dfefbe0
Reviewed-on: https://code.wireshark.org/review/6579
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-17 02:59:59 +00:00
Graham Bloice 528a857258 Fix CMake generation and use of Windows .rc files
CMake now generates local copies of .rc files for all the Windows
components and uses the files in the build of the components.

The .rc.in files that include an icon were modified to allow the icon
path to be set by CMake.  The path is removed for nmake builds.

Updated build architecture detection, required for wireshark.manifest.in

Change-Id: I7b1ff43050e9b0efb861d1041636fb4aef49a4f8
Reviewed-on: https://code.wireshark.org/review/6482
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-01-11 20:22:32 +00:00
Martin Mathieson a190c936d7 Remove unnecessary includes from wiretap folder
Change-Id: I10d3057801673bc1c8ea78f144215869cc4b1851
Reviewed-on: https://code.wireshark.org/review/6217
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-01-03 21:06:36 +00:00
Bill Meier 5c529c95c5 Add '*.nativecodeanalysis.xml' to 'clean' targets
Change-Id: I90dbf0b31fc737150a01533763a7869b34c68cb6
Reviewed-on: https://code.wireshark.org/review/6220
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-02 01:45:16 +00:00
Bill Meier 454fd6e9eb Add "Editor modelines"; Adjust whitespace as needed.
Change-Id: Ic5a5acb0f36d3aa144edbfb1ae71097b18426db4
Reviewed-on: https://code.wireshark.org/review/6216
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-02 00:49:09 +00:00
Alexis La Goutte 24c076f143 pcapng (wiretap): fix Copy-paste error (CID 1158591 & 1158592)
Change-Id: I117c007c0a8be573bb3069fc44a490e6e5d2fef8
Reviewed-on: https://code.wireshark.org/review/6167
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-31 17:11:08 +00:00
Guy Harris 51e58698d2 Get rid of packet data members of header structures.
Instead, have a special macro using the size of the header structure to
find the offset of the packet data.

This means that:

	1) you don't have to throw "-{size of data member}" into the
	   macros that calculate the sizes of the header structures;

	2) you don't have a bunch of randomly-chosen data field sizes;

	3) you don't have sizes of 0, which cause problems with
	   compilers that don't support zero-length arrays;

	4) you don't have some apparently-incorrect "-{size of data
	   member}" values (if they're correct, please fix the structure
	   definitions).

Change-Id: Iea368b83fa2d184bd6df453d51756e4749714e2c
Reviewed-on: https://code.wireshark.org/review/6082
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-27 20:56:42 +00:00
Guy Harris e7d2c8dad5 Get rid of some accidentally-checked-in debugging stuff.
Change-Id: Iea54df783cdff2424d23ecfba8f219dae42d0c83
Reviewed-on: https://code.wireshark.org/review/5888
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-19 22:08:21 +00:00
Michal Labedzki f5cd21543d Bluetooth: Add generic Bluetooth dissector
Bluetooth dissector is used to add ability to filter all bluetooth
payload from capture files (there are many transport like:
hci_h4, hci_h1, hci_usb, hci_mon, btle). Also it is used to placeholder for
all data tree used to store additional informations like bd_addrs, names, etc.
Finally it is used to be one point for Bluetooth
Endpoints/Conversation filtering what is enabled now.

Also add Master/Slave Role and Connection Mode tracking.

Change-Id: I67048080fb8ee16fa0f4ec429c1257de81ddd737
Reviewed-on: https://code.wireshark.org/review/5771
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-12-18 11:03:05 +00:00
Guy Harris 0885d29451 Make sure err_info is always set, and print it iff it's non-null.
Change-Id: Ib5c600c491a3d8adcfa91c00fa9445283610545b
Reviewed-on: https://code.wireshark.org/review/5830
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-18 04:04:19 +00:00
Guy Harris aa27e665b1 Rename WTAP_ERR_REC_TYPE_UNSUPPORTED to WTAP_ERR_UNWRITABLE_REC_TYPE.
That indicates that it's a problem specific to *writing* capture files;
we've already converted some errors to that style, and added a new one
in that style.

Change-Id: I8268316fd8b1a9e301bf09ae970b4b1fbcb35c9d
Reviewed-on: https://code.wireshark.org/review/5826
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-18 00:32:14 +00:00
Guy Harris 51522b3372 Handle "I can't map this for that file format" better.
For cases where record (meta)data is something that can't be written out
in a particular file format, return WTAP_ERR_UNWRITABLE_REC_DATA along
with an err_info string.

Report (and free) that err_info string in cases where
WTAP_ERR_UNWRITABLE_REC_DATA is returned.

Clean up some other error reporting cases, and flag with an XXX some
cases where we aren't reporting errors at all, while we're at it.

Change-Id: I91d02093af0d42c24ec4634c2c773b30f3d39ab3
Reviewed-on: https://code.wireshark.org/review/5823
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-18 00:03:26 +00:00
Guy Harris ddcc2aee3d Rename WTAP_ERR_UNSUPPORTED_FILE_TYPE to WTAP_ERR_UNWRITABLE_FILE_TYPE.
That makes it clearer what the problem is, and that it should only be
returned by the dump code path, not by the read code path.

Change-Id: I22d407efe3ae9fba7aa25f08f050317549866442
Reviewed-on: https://code.wireshark.org/review/5798
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-17 08:31:49 +00:00
Guy Harris dbdcae80ba Rename WTAP_ERR_UNSUPPORTED_ENCAP to WTAP_ERR_UNWRITABLE_ENCAP.
That makes it clearer what the problem is, and that it should only be
returned by the dump code path, not by the read code path.

Change-Id: Icc5c9cff43be6c073f0467607555fa7138c5d074
Reviewed-on: https://code.wireshark.org/review/5797
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-17 06:41:45 +00:00
Guy Harris 40f69b2778 Use WTAP_ERR_UNSUPPORTED for input file stuff we can't handle.
WTAP_ERR_UNSUPPORTED_ENCAP means "I can't *write* that particular
encapsulation type to a file of this format", which mainly means "that
file format simply can't handle packets of that type";
WTAP_ERR_UNSUPPORTED means "this file can't currently be supported by
Wireshark, as there's some feature in the file - such as a file or
per-packet encapsulation type - that we don't (yet) handle".

Change-Id: I53cadf9913d20efb2bccb29f61877b71d53807be
Reviewed-on: https://code.wireshark.org/review/5794
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-17 06:22:57 +00:00
Guy Harris 625ba02b69 Clean up handling of files without a known encapsulation.
Fail with an "unsupported encapsulation" error for MTP2 and SSCOP,
rather than just returning "unknown encapsulation", and fail with that
if the encapsulation isn't filled in as well, although that might be a
deeper problem.

(Not that people should be handing text output files from K12 analyzers
anyway - they should hand us RF5 files and, if we can't handle their
file, file a bug and give us the file so we can further reverse-engineer
the format.)

Change-Id: I6bbd5f81787d69bd3b41eaedf2893d179f11ad6a
Reviewed-on: https://code.wireshark.org/review/5792
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-17 05:35:58 +00:00
Guy Harris fbf08cffec Nothing to free there.
pcapng_read_block() never sets *err_info if it returns
PCAPNG_BLOCK_NOT_SHB - that happens on an EOF, a short read, or on a
successful read of something that doesn't look like an SHB.

Change-Id: I23ad6aa1c95d800b068a798a4aad1d70d07ac281
Reviewed-on: https://code.wireshark.org/review/5686
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-09 04:04:54 +00:00
Guy Harris 3d95c623a8 Don't try to look in a non-existent hash table.
We only create hash tables if somebody puts a handler in one, so we need
to check whether the hash table exists first, to avoid run-time warnings.

Change-Id: I739d2d808935e651b11bd44b258f168a42ca4b7c
Reviewed-on: https://code.wireshark.org/review/5683
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-09 01:30:41 +00:00