Language: C
Label: vulnerable
CWE: CWE-1077 \u2014 Floating Point Comparison with Incorrect Operator
The code performs a comparison such as an
        equality test between two float (floating point) values, but
        it uses comparison operators that do not account for the
        possibility of loss of precision.

Code:
static u32 swf_get_32(SWFReader *read)
{
	u32 val, res;
	val = swf_read_int(read, 32);
	res = (val&0xFF);
	res <<=8;
	res |= ((val>>8)&0xFF);
	res<<=8;
	res |= ((val>>16)&0xFF);
	res<<=8;
	res|= ((val>>24)&0xFF);
	return res;
}