...
Code Block | ||
---|---|---|
| ||
struct foo { int flag : 1; int counter : 15; }; struct foo my_foo; ... pthread_mutex_lock(&my_mutex); my_foo.flag = !my_foo.flag; pthread_mutex_unlock(&my_mutex); my_foo.counter++; |
Risk Assessment
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
INT | 2 (medium) | 1 (probable) | 1 (medium) | P2 | L3 |
Wiki Markup |
---|
*Sources:* [http://en.wikipedia.org/wiki/Bit_field] [http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf] \[Section 6.7.2.1\] |