Wireshark-commits: [Wireshark-commits] master a395a8b: GeoIP: avoid closing random file descriptors
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=a395a8b9939bd48858efbd3da5897a59d4697eba
Submitter: Gerald Combs (gerald@xxxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
a395a8b by Peter Wu (peter@xxxxxxxxxxxxx):
GeoIP: avoid closing random file descriptors
Previously there were three different pipe validity checks:
PID != WS_INVALID_PID, PID != 0 and stdin != 0. This resulted in
using/closing file descriptors which might be owned by something else.
When no GeoIP databases are defined, mmdb_resolve_stop would be called
to close the pipe and set PID to WS_INVALID_PID. stdin is however not
cleared and future invocations would try to close the previous fd.
Change-Id: I1d15da29208efb41098ee6a4edeeabf61f84c2b3
Fixes: v2.5.1rc0-466-ga1da75c554 ("Transition from GeoIP Legacy to MaxMindDB.")
Reviewed-on: https://code.wireshark.org/review/26391
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@xxxxxxxxxxxxx>
Actions performed:
from 02085c8 IEEE 802.15.4: fix wmem_free instead of g_free; fix outdated comments
adds a395a8b GeoIP: avoid closing random file descriptors
Summary of changes:
epan/maxmind_db.c | 25 +++++++++++++++++++------
wsutil/ws_pipe.h | 8 ++++++++
2 files changed, 27 insertions(+), 6 deletions(-)