Wireshark-commits: [Wireshark-commits] master eaf702b: ber: fix undefined shift
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sun, 14 Jun 2015 13:23:15 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=eaf702bdcc90e869599709d227fad0b281723091
Submitter: Peter Wu (peter@xxxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

eaf702b by Peter Wu (peter@xxxxxxxxxxxxx):

    ber: fix undefined shift
    
    Fixes this UBSan warning:
    
        epan/dissectors/packet-ber.c:1917:23: runtime error: left shift of
            54645397829836991 by 8 places cannot be represented in type
            'long int'
    
    Integers are two's complement, so really just cast it to unsigned to
    avoid undefined behavior and still set the upper bit.
    
    Change-Id: Ia5d080ae8b9dd39aef5e700daeede5c235b425ea
    Reviewed-on: https://code.wireshark.org/review/8908
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    

Actions performed:

    from  8e746bd   MPLS: always display payload when no 'Decode As' preference is set
    adds  eaf702b   ber: fix undefined shift


Summary of changes:
 epan/dissectors/packet-ber.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)