Wireshark-commits: [Wireshark-commits] master-1.12 04e948d: In the name of God and all that is holy

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 12 May 2015 05:58:03 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=04e948dabc582b300b0e1307380d919c59e47fc5
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-1.12
Repository: wireshark

Commits:

04e948d by Guy Harris (guy@xxxxxxxxxxxx):

    In the name of God and all that is holy, don't do that.
    
    	http://www.bitterfilms.com/rejected.html
    
    1) There is *NO* guarantee that you can safely dereference a misaligned
    pointer.
    
    2) There is *NO* guarantee that you are running on a little-endian
    machine, so that an attempt to fetch a 32-bit integer through such a
    pointer will fetch it in little-endian form.
    
    Instead, fetch it using tvb_get_letohl(), which 1) doesn't care about
    alignment and 2) always fetches in little-endian order.
    
    Change-Id: I44721cbf3c4456797990cc741836c9dd8c6c3696
    Reviewed-on: https://code.wireshark.org/review/8423
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    (cherry picked from commit 2693e1d1081ac8a5f3cf15b5961d0229775e25e6)
    Reviewed-on: https://code.wireshark.org/review/8424
    

Actions performed:

    from  d989452   Do not assume the data field of an address structure is an aligned pointer.
    adds  04e948d   In the name of God and all that is holy, don't do that.


Summary of changes:
 epan/dissectors/packet-lbmc.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)