Wireshark-commits: [Wireshark-commits] master d24a11e: dot11decrypt: Avoid unecessary memmove
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=d24a11ee2ea4adeccc4b56ff3e1115cadaacf5a7
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark
Commits:
d24a11e by Mikael Kanstrup (mikael.kanstrup@xxxxxxxx):
dot11decrypt: Avoid unecessary memmove
When decrypting a frame the decryption occurs in a temporary buffer.
After successful decryption the decrypted frame is first copied back,
then a memmove operation is used to remove the CCMP header mid frame.
As the mac header is not encrypted there's no need to copy that part
back again after decryption. This means there's no mid frame data
that must be removed. Instead just copy the relevant portion and
save one memmove operation.
Change-Id: I24b938a6f5fac5a23cd0132aefe9ce258b352ef8
Reviewed-on: https://code.wireshark.org/review/36342
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
Actions performed:
from a413802 dot11decrypt: Remove unnecessary offset parameter
add d24a11e dot11decrypt: Avoid unecessary memmove
Summary of changes:
epan/crypt/dot11decrypt.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)