Wireshark-commits: [Wireshark-commits] master 3d1e302: wmem: make wmem_strsplit behave more like g_
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=3d1e3023d2300fe558c6b03066b2b6497f5b02b0
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
3d1e302 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>
Actions performed:
from 59dcf1f LPP: upgrade dissector to v15.0.0
adds 3d1e302 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(-)