Wireshark-commits: [Wireshark-commits] master-1.10 be343af: Don't assert out on tvb_memcpy() with a
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=be343af800dc1666541b5e44bbc5183c5bdbf918
Submitter: Michael Mann (mmann78@xxxxxxxxxxxx)
Changed: branch: master-1.10
Repository: wireshark
Commits:
be343af by Guy Harris (guy@xxxxxxxxxxxx):
Don't assert out on tvb_memcpy() with a null data pointer if the length is 0.
If the length is 0, there's nothing to copy, so it doesn't matter if
there's no data to copy from. This fixes problems caused by allocating
a zero-length buffer and using that as the data for a tvbuff; the
allocation returns null, so the data pointer is null.
Bug: 9332
Change-Id: I8037ae4b96d30e90a716852bb7e22d3980444f83
Reviewed-on: https://code.wireshark.org/review/3761
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
(cherry picked from commit 66318ad5eb8235e73e66acee372df7c47cfea8bd)
Conflicts:
epan/tvbuff.c
Reviewed-on: https://code.wireshark.org/review/5773
Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
Actions performed:
from fd7e355 [Automatic manuf, services and enterprise-numbers update for 2014-12-14]
adds be343af Don't assert out on tvb_memcpy() with a null data pointer if the length is 0.
Summary of changes:
epan/tvbuff.c | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)