ber: fix undefined shift
authorPeter Wu <peter@lekensteyn.nl>
Fri, 12 Jun 2015 17:54:43 +0000 (19:54 +0200)
committerPeter Wu <peter@lekensteyn.nl>
Sun, 14 Jun 2015 13:23:09 +0000 (13:23 +0000)
commiteaf702bdcc90e869599709d227fad0b281723091
tree544197ba7ced07b4984a0ae6c317b1041822baba
parent8e746bdd20d2619d4b163164011909781ec46134
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@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
epan/dissectors/packet-ber.c