use of attacker-controlled value ‘h’ as divisor without checking for zero [-Wanalyzer-tainted-divisor]
16 return *p / *q; /* { dg-warning "-Wanalyzer-tainted-divisor" } */
~~~^~~~
test_pointer_to_global
test_pointer_to_global: events 1-2
14 fread (&h, sizeof (h), 1, f);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
(1) ‘h’ gets an unchecked value here
15
16 return *p / *q; /* { dg-warning "-Wanalyzer-tainted-divisor" } */
~~~~~~~
|
(2) ⚠️ use of attacker-controlled value ‘h’ as divisor without checking for zero