Wireshark-commits: [Wireshark-commits] master-2.0 11b6fe5: Use wmem_memdup() instead of wmem_alloc(
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=11b6fe57b9cffb672e3afd16de7f75bbb3d89a1c
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.0
Repository: wireshark
Commits:
11b6fe5 by Guy Harris (guy@xxxxxxxxxxxx):
Use wmem_memdup() instead of wmem_alloc() followed by memcpy().
This also fixes a case where, if nfs_fh->len wasn't a multiple of 4, the
allocated buffer was too short, by the difference between the next lower
multiple of 4 and nfs_fh->len, so the memcpy() went past the end of the
buffer. (And, yes, an NFSv3 file handle can have a byte count that's
not a multiple of 4 - it's a variable-length opaque type - even if the
marshalled data is padded with 0s to a multiple of 4 bytes, as with
other XDR types.)
Change-Id: I689d4b365e8a1547428a1580884f66177dc5841b
Reviewed-on: https://code.wireshark.org/review/12964
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
(cherry picked from commit 5a60c0d72e7dfc8c326e854a0d2b739537abb008)
Reviewed-on: https://code.wireshark.org/review/12965
Actions performed:
from dfc3098 GTP: fix Dual Stack with one static and one Dynamic IP dissection
adds 11b6fe5 Use wmem_memdup() instead of wmem_alloc() followed by memcpy().
Summary of changes:
epan/dissectors/packet-nfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)