Wireshark-commits: [Wireshark-commits] master 9fba5f0: Fix some cases where we're shifting a signed
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=9fba5f0764678cfed4b7ff2a41fdcb0babcdbf55
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
9fba5f0 by Guy Harris (guy@xxxxxxxxxxxx):
Fix some cases where we're shifting a signed 1 left.
Shift 1U instead, to make sure it's unsigned; the result of, for
example, the result of shifting a signed value left is undefined if the
value times 2^{shift count} doesn't fit in the *signed* type of the
shifted value. That means, in particular, that the result of shifting 1
left by {number of bits in an int - 1} is undefined. (In *practice*,
it'll probably be -2^32, with the bit you want set, but that's not
guaranteed, and GCC 5.1 seems not to like it.)
Change-Id: I0d27565c382a04ceda9eec65f45a430ceb74cf53
Reviewed-on: https://code.wireshark.org/review/8255
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from d2b02ea Don't shift signed values left.
adds 9fba5f0 Fix some cases where we're shifting a signed 1 left.
Summary of changes:
epan/dissectors/packet-afp.c | 222 +++++++++++++++----------------
epan/dissectors/packet-ceph.c | 100 +++++++-------
epan/dissectors/packet-fcels.c | 6 +-
epan/dissectors/packet-netperfmeter.c | 4 +-
epan/dissectors/packet-reload-framing.c | 12 +-
epan/dissectors/packet-rsvp.c | 30 ++---
epan/dissectors/packet-rtps.c | 8 +-
epan/req_resp_hdrs.c | 2 +-
mkcap.c | 6 +-
plugins/wimaxasncp/packet-wimaxasncp.c | 14 +-
wiretap/k12.c | 2 +-
11 files changed, 203 insertions(+), 203 deletions(-)