URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=dbd4bc87d0924a727c10d342c18e84d9bd917ba0
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master-2.2
Repository: wireshark
Commits:
dbd4bc8 by Peter Wu (peter@xxxxxxxxxxxxx):
wmem: make wmem_strsplit behave more like g_strsplit
In the past "g_strsplit" users were converted to use "wmem_strsplit" to
avoid memory leaks when dissection fails. The semantics were slightly
different though. When the DNS dissector tried to split the string "."
using delimiter ".", it would previously (unexpectedly) receive an empty
vector (and crash). Now it will receive a vector with one element.
Additionally, suggest that users of wmem_strsplit with a NULL allocator
use g_strsplit instead, otherwise it will leak the elements.
Bug: 14980
Change-Id: I408dfdb0ffa9e24ccdba69c8ee095abea72f6feb
Reviewed-on: https://code.wireshark.org/review/28724
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
(cherry picked from commit 3d1e3023d2300fe558c6b03066b2b6497f5b02b0)
Reviewed-on: https://code.wireshark.org/review/28738
Actions performed:
from d7a29fa Lua: add include/lua-5.1 and include/lua-5.2 to CMake path suffixes
adds dbd4bc8 wmem: make wmem_strsplit behave more like g_strsplit
Summary of changes:
epan/wmem/wmem_strutl.c | 79 +++++++++++++++++++------------------------------
epan/wmem/wmem_strutl.h | 5 +++-
epan/wmem/wmem_test.c | 32 +++++++++++++++-----
3 files changed, 58 insertions(+), 58 deletions(-)