Bug: 32 bit int shifted by 32 bits in
org.eclipse.pde.internal.swt.tools.IconExe.read8(RandomAccessFile)

The code performs shift of a 32 bit int by a constant amount outside the
range -31..31. The effect of this is to use the lower 5 bits of the
integer value to decide how much to shift by (e.g., shifting by 40 bits
is the same as shifting by 8 bits, and shifting by 32 bits is the same
as shifting by zero bits). This probably isn't what was expected, and it
is at least confusing.

Rank: Scariest (1), confidence: High
Pattern: ICAST_BAD_SHIFT_AMOUNT
Type: BSHIFT, Category: CORRECTNESS (Correctness)

Change-Id: I8a50ebdc0171938901bd125e0733422d1c6593a6
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
1 file changed