Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 7824] Failure to check return values from ws_fopen calls

Date: Wed, 10 Oct 2012 12:17:28 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7824

--- Comment #10 from Guy Harris <guy@xxxxxxxxxxxx> 2012-10-10 12:17:28 PDT ---
So ddict_open() just passes the open failure on to its callers, and its
*callers* must check for failure.

It's called in the include-processing code, where, if it fails *and* errno is
non-zero, the lexical analyzer bails out.  Otherwise, it just doesn't process
the include file, so it won't dereference the null pointer, but it won't report
any problem, either.  It should probably report *something* and fail if the
open fails.

It's also called in ddict_scan(), which passes the open failure onto its
callers.  ddict_scan() is called in main() in a test program that's built from
diam_dict.l if TEST_DIAM_DICT_STANDALONE is defined, and in dictionary_load()
in epan/dissectors/packet-diameter.c.  NULL is checked for in the latter case,
but not the former case; the former case doesn't affect Wireshark but it should
probably be fixed as well.

I've checked in changes to do both of those in r45452.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.