diff --git a/epan/dwarf.c b/epan/dwarf.c index 910a6407b5..eb55dd78f3 100644 --- a/epan/dwarf.c +++ b/epan/dwarf.c @@ -39,7 +39,7 @@ dissect_uleb128(tvbuff_t *tvb, gint offset, guint64 *value) byte = tvb_get_guint8(tvb, offset); offset += 1; - *value |= (byte & 0x7F) << shift; + *value |= ((guint64)(byte & 0x7F) << shift); shift += 7; } while (byte & 0x80); @@ -59,7 +59,7 @@ dissect_leb128(tvbuff_t *tvb, gint offset, gint64 *value) byte = tvb_get_guint8(tvb, offset); offset += 1; - *value |= (byte & 0x7F) << shift; + *value |= ((guint64)(byte & 0x7F) << shift); shift += 7; } while (byte & 0x80);