URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=e3b2b2fdc3e6f2c4f1fd659bc6d045f237527036
Submitter: Pascal Quantin (pascal.quantin@xxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
e3b2b2f by Pascal Quantin (pascal.quantin@xxxxxxxxx):
POP: replace wmem_strndup by tvb_memcpy
gdd3b977 introduced the use of wmem_strndup to ensure that the string is
NULL terminated.
But it also stops as soon as it finds a NULL character, which can happen
with malformed packets. So let's copy all the bytes with tvb_memcpy and
add manually a NULL character at the end of the buffer for safeness.
Bug: 13074
Change-Id: I9ae65d739a92bc6167e4acfc275e1909f3890815
Reviewed-on: https://code.wireshark.org/review/18582
Petri-Dish: Pascal Quantin <pascal.quantin@xxxxxxxxx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
Reviewed-by: Pascal Quantin <pascal.quantin@xxxxxxxxx>
Actions performed:
from d8fca58 InterfaceList: Fix build without pcap
adds e3b2b2f POP: replace wmem_strndup by tvb_memcpy
Summary of changes:
epan/dissectors/packet-pop.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)