...
Code Block | ||
---|---|---|
| ||
int si1, si2, = /* initialized using untrusted data */; int si2 = /* initialized using untrusted data */; int sresult; unsigned int ui1, ui2, = /* initialized using untrusted data */; unsigned int ui2 = /* initialized using untrusted data */; unsigned int uresult; sresult = si1 >> si2; uresult = ui1 >> ui2; |
...
Code Block | ||
---|---|---|
| ||
unsigned int ui1, ui2, result = /* initialized using untrusted data */; unsigned int ui2 = /* initialized using untrusted data */; unsigned int uresult; if (ui2 >= sizeof(unsigned int) * CHAR_BIT) { /* handle error condition */ } else { uresult = ui1 >> ui2; } |
...