URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=45a376ca74fe9cc8f7d40858884f98beafb26a9b
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master-2.4
Repository: wireshark
Commits:
45a376c 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/28737
Actions performed:
from d47754a Lua: add include/lua-5.1 and include/lua-5.2 to CMake path suffixes
adds 45a376c 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(-)