Event 1:
ftell() returns a potentially dangerous value [
?potentially dangerous: the value cannot be determined and may come from program input].
- Determines the value that is cast in the Cast Alters Value warning later.
hide
Event 2:
Considering the case where
ftell(wdh->fh) is equal to
-1.
hide
Cast Alters Value
ftell(wdh->fh) is cast from
long to
unsigned int.
- ftell(wdh->fh) evaluates to -1.
- Negative values cannot be stored as unsigned int. Casting them to unsigned int can cause data loss or sign change.
The issue can occur if the highlighted code executes.
See related events 1 and 2.
Show: All events | Only primary events