...
This rule appears in the Java Secure Coding Standard as INT30-J. Be careful while casting integers to narrower types.
...
Bibliography
Wiki Markup |
---|
\[[Dowd 06|AA. Bibliography#Dowd 06]\] Chapter 6, "C Language Issues" (Type Conversions, pp. 223-270) \[[ISO/IEC 9899:1999|AA. Bibliography#ISO/IEC 9899-1999]\] 6.3, "Conversions" \[[ISO/IEC PDTR 24772|AA. Bibliography#ISO/IEC PDTR 24772]\] "FLC Numeric Conversion Errors" \[[MISRA 04|AA. Bibliography#MISRA 04]\] Rules 10.1, 10.3, 10.5, and 12.9 \[[MITRE 07|AA. Bibliography#MITRE 07]\] [CWE ID 192|http://cwe.mitre.org/data/definitions/192.html], "Integer Coercion Error," [CWE ID 197|http://cwe.mitre.org/data/definitions/197.html], "Numeric Truncation Error," and [CWE ID 681|http://cwe.mitre.org/data/definitions/681.html], "Incorrect Conversion between Numeric Types" \[[Seacord 05a|AA. Bibliography#Seacord 05]\] Chapter 5, "Integers" \[[Viega 05|AA. Bibliography#Viega 05]\] Section 5.2.9, "Truncation error," Section 5.2.10, "Sign extension error," Section 5.2.11, "Signed to unsigned conversion error," and Section 5.2.12, "Unsigned to signed conversion error" \[[Warren 02|AA. Bibliography#Warren 02]\] Chapter 2, "Basics" \[[xorl 2009|AA. Bibliography#xorl 2009]\] ["CVE-2009-1376: Pidgin MSN SLP Integer Truncation"|http://xorl.wordpress.com/2009/05/28/cve-2009-1376-pidgin-msn-slp-integer-truncation/] |
...