Skip to content

Commit f5bfa52

Browse files
author
Nikita Kraiouchkine
committed
Regenerate help files to resolve format issue
1 parent 6d471f2 commit f5bfa52

File tree

5 files changed

+1
-5
lines changed

5 files changed

+1
-5
lines changed

c/cert/src/rules/INT30-C/UnsignedIntegerOperationsWrapAround.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ This query implements the CERT-C rule INT30-C:
55
> Ensure that unsigned integer operations do not wrap
66
77

8-
98
## Description
109

1110
The C Standard, 6.2.5, paragraph 9 \[[ISO/IEC 9899:2011](https://wiki.sei.cmu.edu/confluence/display/c/AA.+Bibliography#AA.Bibliography-ISO-IEC9899-2011)\], states

c/cert/src/rules/INT31-C/IntegerConversionCausesDataLoss.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ This query implements the CERT-C rule INT31-C:
55
> Ensure that integer conversions do not result in lost or misinterpreted data
66
77

8-
98
## Description
109

1110
Integer conversions, both implicit and explicit (using a cast), must be guaranteed not to result in lost or misinterpreted data. This rule is particularly true for integer values that originate from untrusted sources and are used in any of the following ways:
@@ -294,6 +293,7 @@ Integer truncation errors can lead to buffer overflows and the execution of arbi
294293
## Automated Detection
295294
296295
<table> <tbody> <tr> <th> Tool </th> <th> Version </th> <th> Checker </th> <th> Description </th> </tr> <tr> <td> <a> Astrée </a> </td> <td> 22.04 </td> <td> </td> <td> Supported via MISRA C:2012 Rules 10.1, 10.3, 10.4, 10.6 and 10.7 </td> </tr> <tr> <td> <a> CodeSonar </a> </td> <td> 7.2p0 </td> <td> <strong>LANG.CAST.PC.AVLANG.CAST.PC.CONST2PTRLANG.CAST.PC.INT</strong> <strong>LANG.CAST.COERCELANG.CAST.VALUE</strong> <strong>ALLOC.SIZE.TRUNCMISC.MEM.SIZE.TRUNC</strong> <strong>LANG.MEM.TBA</strong> </td> <td> Cast: arithmetic type/void pointer Conversion: integer constant to pointer Conversion: pointer/integer Coercion alters value Cast alters value Truncation of allocation size Truncation of size Tainted buffer access </td> </tr> <tr> <td> <a> Compass/ROSE </a> </td> <td> </td> <td> </td> <td> Can detect violations of this rule. However, false warnings may be raised if <code>limits.h</code> is included </td> </tr> <tr> <td> <a> Coverity </a> \* </td> <td> 2017.07 </td> <td> <strong>NEGATIVE_RETURNS</strong> <strong>REVERSE_NEGATIVE</strong> <strong>MISRA_CAST</strong> </td> <td> Can find array accesses, loop bounds, and other expressions that may contain dangerous implied integer conversions that would result in unexpected behavior Can find instances where a negativity check occurs after the negative value has been used for something else Can find instances where an integer expression is implicitly converted to a narrower integer type, where the signedness of an integer value is implicitly converted, or where the type of a complex expression is implicitly converted </td> </tr> <tr> <td> <a> Cppcheck </a> </td> <td> 1.66 </td> <td> <strong>memsetValueOutOfRange</strong> </td> <td> The second argument to <code>memset()</code> cannot be represented as <code>unsigned char</code> </td> </tr> <tr> <td> <a> Helix QAC </a> </td> <td> 2022.4 </td> <td> <strong>C2850, C2855, C2890, C2895, C2900, C2905, </strong> <strong>C++2850, C++2855, C++2890, </strong> <strong>C++2895, C++2900, </strong> <strong>C++2905, C++3000, C++3010</strong> <strong>DF2851, DF2852, DF2853, DF2856, DF2857, DF2858, DF2891, DF2892, DF2893, DF2896, DF2897, DF2898, DF2901, DF2902, DF2903, DF2906, DF2907, DF2908</strong> </td> <td> </td> </tr> <tr> <td> <a> Klocwork </a> </td> <td> 2022.4 </td> <td> <strong>PORTING.CAST.SIZE</strong> </td> <td> </td> </tr> <tr> <td> <a> LDRA tool suite </a> </td> <td> 9.7.1 </td> <td> <strong>93 S</strong> <strong>, 433 S</strong> <strong>, 434 S</strong> </td> <td> Partially implemented </td> </tr> <tr> <td> <a> Parasoft C/C++test </a> </td> <td> 2022.2 </td> <td> <strong>CERT_C-INT31-a</strong> <strong>CERT_C-INT31-b</strong> <strong>CERT_C-INT31-c</strong> <strong>CERT_C-INT31-d</strong> <strong>CERT_C-INT31-e</strong> <strong>CERT_C-INT31-f</strong> <strong>CERT_C-INT31-g</strong> <strong>CERT_C-INT31-h</strong> <strong>CERT_C-INT31-i</strong> <strong>CERT_C-INT31-j</strong> <strong>CERT_C-INT31-k</strong> <strong>CERT_C-INT31-l</strong> <strong>CERT_C-INT31-m</strong> <strong>CERT_C-INT31-nCERT_C-INT31-o</strong> </td> <td> An expression of essentially Boolean type should always be used where an operand is interpreted as a Boolean value An operand of essentially Boolean type should not be used where an operand is interpreted as a numeric value An operand of essentially character type should not be used where an operand is interpreted as a numeric value An operand of essentially enum type should not be used in an arithmetic operation Shift and bitwise operations should not be performed on operands of essentially signed or enum type An operand of essentially signed or enum type should not be used as the right hand operand to the bitwise shifting operator An operand of essentially unsigned type should not be used as the operand to the unary minus operator The value of an expression shall not be assigned to an object with a narrower essential type The value of an expression shall not be assigned to an object of a different essential type category Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category The second and third operands of the ternary operator shall have the same essential type category The value of a composite expression shall not be assigned to an object with wider essential type If a composite expression is used as one operand of an operator in which the usual arithmetic conversions are performed then the other operand shall not have wider essential type If a composite expression is used as one (second or third) operand of a conditional operator then the other operand shall not have wider essential type Avoid integer overflows </td> </tr> <tr> <td> <a> Polyspace Bug Finder </a> </td> <td> R2022b </td> <td> <a> CERT C: Rule INT31-C </a> </td> <td> Checks for: Integer conversion overflownteger conversion overflow, call to memset with unintended value all to memset with unintended value , sign change integer conversion overflowign change integer conversion overflow, tainted sign change conversionainted sign change conversion, unsigned integer conversion overflownsigned integer conversion overflow. Rule partially covered. </td> </tr> <tr> <td> <a> PRQA QA-C </a> </td> <td> 9.7 </td> <td> <strong>2850, 2851, 2852, 2853, </strong> <strong><strong>2855, 2856, 2857, 2858,</strong></strong> <strong><strong>2890, 2891, 2892, 2893, </strong></strong> <strong><strong>2895, 2896, 2897, 2898</strong></strong> <strong>2900, 2901, 2902, 2903, </strong> <strong>2905, 2906, 2907, 2908</strong> </td> <td> Partially implemented </td> </tr> <tr> <td> <a> PRQA QA-C++ </a> </td> <td> 4.4 </td> <td> <strong>2850, 2851, 2852, 2853, 2855, 2856, 2857, 2858, </strong> <strong>2890, 2891, 2892, 2893, 2895, 2896, 2897, 2898, </strong> <strong>2900, 2901, 2902, 2903, 2905, 2906, 2907, 2908, </strong> <strong>3000, 3010</strong> </td> <td> </td> </tr> <tr> <td> <a> PVS-Studio </a> </td> <td> 7.23 </td> <td> <strong>V562<a></a></strong> , <strong>V569<a></a></strong> , <strong>V642<a></a></strong> , <strong><a>V676</a></strong> , <strong><a>V716</a></strong> , <strong><a>V721</a></strong> , <strong>V724<a></a></strong> , <strong><a>V732</a></strong> , <strong><a>V739</a></strong> , <strong><a>V784</a></strong> , <strong><a>V793</a></strong> , <strong><a>V1019</a></strong> , <strong><a>V1029</a></strong> , <strong> <a>V1046</a></strong> </td> <td> </td> </tr> <tr> <td> <a> RuleChecker </a> </td> <td> 22.04 </td> <td> </td> <td> Supported via MISRA C:2012 Rules 10.1, 10.3, 10.4, 10.6 and 10.7 </td> </tr> <tr> <td> <a> TrustInSoft Analyzer </a> </td> <td> 1.38 </td> <td> <strong>signed_downcast</strong> </td> <td> Exhaustively verified. </td> </tr> </tbody> </table>
296+
<table> <tbody> <tr> <th> Tool </th> <th> Version </th> <th> Checker </th> <th> Description </th> </tr> <tr> <td> <a> Astrée </a> </td> <td> 22.04 </td> <td> </td> <td> Supported via MISRA C:2012 Rules 10.1, 10.3, 10.4, 10.6 and 10.7 </td> </tr> <tr> <td> <a> CodeSonar </a> </td> <td> 7.2p0 </td> <td> <strong>LANG.CAST.PC.AVLANG.CAST.PC.CONST2PTRLANG.CAST.PC.INT</strong> <strong>LANG.CAST.COERCELANG.CAST.VALUE</strong> <strong>ALLOC.SIZE.TRUNCMISC.MEM.SIZE.TRUNC</strong> <strong>LANG.MEM.TBA</strong> </td> <td> Cast: arithmetic type/void pointer Conversion: integer constant to pointer Conversion: pointer/integer Coercion alters value Cast alters value Truncation of allocation size Truncation of size Tainted buffer access </td> </tr> <tr> <td> <a> Compass/ROSE </a> </td> <td> </td> <td> </td> <td> Can detect violations of this rule. However, false warnings may be raised if <code>limits.h</code> is included </td> </tr> <tr> <td> <a> Coverity </a> \* </td> <td> 2017.07 </td> <td> <strong>NEGATIVE_RETURNS</strong> <strong>REVERSE_NEGATIVE</strong> <strong>MISRA_CAST</strong> </td> <td> Can find array accesses, loop bounds, and other expressions that may contain dangerous implied integer conversions that would result in unexpected behavior Can find instances where a negativity check occurs after the negative value has been used for something else Can find instances where an integer expression is implicitly converted to a narrower integer type, where the signedness of an integer value is implicitly converted, or where the type of a complex expression is implicitly converted </td> </tr> <tr> <td> <a> Cppcheck </a> </td> <td> 1.66 </td> <td> <strong>memsetValueOutOfRange</strong> </td> <td> The second argument to <code>memset()</code> cannot be represented as <code>unsigned char</code> </td> </tr> <tr> <td> <a> Helix QAC </a> </td> <td> 2022.4 </td> <td> <strong>C2850, C2855, C2890, C2895, C2900, C2905, </strong> <strong>C++2850, C++2855, C++2890, </strong> <strong>C++2895, C++2900, </strong> <strong>C++2905, C++3000, C++3010</strong> <strong>DF2851, DF2852, DF2853, DF2856, DF2857, DF2858, DF2891, DF2892, DF2893, DF2896, DF2897, DF2898, DF2901, DF2902, DF2903, DF2906, DF2907, DF2908</strong> </td> <td> </td> </tr> <tr> <td> <a> Klocwork </a> </td> <td> 2022.4 </td> <td> <strong>PORTING.CAST.SIZE</strong> </td> <td> </td> </tr> <tr> <td> <a> LDRA tool suite </a> </td> <td> 9.7.1 </td> <td> <strong>93 S</strong> <strong>, 433 S</strong> <strong>, 434 S</strong> </td> <td> Partially implemented </td> </tr> <tr> <td> <a> Parasoft C/C++test </a> </td> <td> 2022.2 </td> <td> <strong>CERT_C-INT31-a</strong> <strong>CERT_C-INT31-b</strong> <strong>CERT_C-INT31-c</strong> <strong>CERT_C-INT31-d</strong> <strong>CERT_C-INT31-e</strong> <strong>CERT_C-INT31-f</strong> <strong>CERT_C-INT31-g</strong> <strong>CERT_C-INT31-h</strong> <strong>CERT_C-INT31-i</strong> <strong>CERT_C-INT31-j</strong> <strong>CERT_C-INT31-k</strong> <strong>CERT_C-INT31-l</strong> <strong>CERT_C-INT31-m</strong> <strong>CERT_C-INT31-nCERT_C-INT31-o</strong> </td> <td> An expression of essentially Boolean type should always be used where an operand is interpreted as a Boolean value An operand of essentially Boolean type should not be used where an operand is interpreted as a numeric value An operand of essentially character type should not be used where an operand is interpreted as a numeric value An operand of essentially enum type should not be used in an arithmetic operation Shift and bitwise operations should not be performed on operands of essentially signed or enum type An operand of essentially signed or enum type should not be used as the right hand operand to the bitwise shifting operator An operand of essentially unsigned type should not be used as the operand to the unary minus operator The value of an expression shall not be assigned to an object with a narrower essential type The value of an expression shall not be assigned to an object of a different essential type category Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category The second and third operands of the ternary operator shall have the same essential type category The value of a composite expression shall not be assigned to an object with wider essential type If a composite expression is used as one operand of an operator in which the usual arithmetic conversions are performed then the other operand shall not have wider essential type If a composite expression is used as one (second or third) operand of a conditional operator then the other operand shall not have wider essential type Avoid integer overflows </td> </tr> <tr> <td> <a> Polyspace Bug Finder </a> </td> <td> R2023a </td> <td> <a> CERT C: Rule INT31-C </a> </td> <td> Checks for: Integer conversion overflownteger conversion overflow, call to memset with unintended value all to memset with unintended value , sign change integer conversion overflowign change integer conversion overflow, tainted sign change conversionainted sign change conversion, unsigned integer conversion overflownsigned integer conversion overflow. Rule partially covered. </td> </tr> <tr> <td> <a> PRQA QA-C </a> </td> <td> 9.7 </td> <td> <strong>2850, 2851, 2852, 2853, </strong> <strong><strong>2855, 2856, 2857, 2858,</strong></strong> <strong><strong>2890, 2891, 2892, 2893, </strong></strong> <strong><strong>2895, 2896, 2897, 2898</strong></strong> <strong>2900, 2901, 2902, 2903, </strong> <strong>2905, 2906, 2907, 2908</strong> </td> <td> Partially implemented </td> </tr> <tr> <td> <a> PRQA QA-C++ </a> </td> <td> 4.4 </td> <td> <strong>2850, 2851, 2852, 2853, 2855, 2856, 2857, 2858, </strong> <strong>2890, 2891, 2892, 2893, 2895, 2896, 2897, 2898, </strong> <strong>2900, 2901, 2902, 2903, 2905, 2906, 2907, 2908, </strong> <strong>3000, 3010</strong> </td> <td> </td> </tr> <tr> <td> <a> PVS-Studio </a> </td> <td> 7.23 </td> <td> <strong>V562<a></a></strong> , <strong>V569<a></a></strong> , <strong>V642<a></a></strong> , <strong><a>V676</a></strong> , <strong><a>V716</a></strong> , <strong><a>V721</a></strong> , <strong>V724<a></a></strong> , <strong><a>V732</a></strong> , <strong><a>V739</a></strong> , <strong><a>V784</a></strong> , <strong><a>V793</a></strong> , <strong><a>V1019</a></strong> , <strong><a>V1029</a></strong> , <strong> <a>V1046</a></strong> </td> <td> </td> </tr> <tr> <td> <a> RuleChecker </a> </td> <td> 22.04 </td> <td> </td> <td> Supported via MISRA C:2012 Rules 10.1, 10.3, 10.4, 10.6 and 10.7 </td> </tr> <tr> <td> <a> TrustInSoft Analyzer </a> </td> <td> 1.38 </td> <td> <strong>signed_downcast</strong> </td> <td> Exhaustively verified. </td> </tr> </tbody> </table>
297297
\* Coverity Prevent cannot discover all violations of this rule, so further [verification](https://wiki.sei.cmu.edu/confluence/display/c/BB.+Definitions#BB.Definitions-verification) is necessary.
298298
299299

c/cert/src/rules/INT32-C/SignedIntegerOverflow.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ This query implements the CERT-C rule INT32-C:
55
> Ensure that operations on signed integers do not result in overflow
66
77

8-
98
## Description
109

1110
Signed integer overflow is [undefined behavior 36](https://wiki.sei.cmu.edu/confluence/display/c/BB.+Definitions#BB.Definitions-undefinedbehavior). Consequently, [implementations](https://wiki.sei.cmu.edu/confluence/display/c/BB.+Definitions#BB.Definitions-implementation) have considerable latitude in how they deal with signed integer overflow. (See [MSC15-C. Do not depend on undefined behavior](https://wiki.sei.cmu.edu/confluence/display/c/MSC15-C.+Do+not+depend+on+undefined+behavior).) An implementation that defines signed integer types as being modulo, for example, need not detect integer overflow. Implementations may also trap on signed arithmetic overflows, or simply assume that overflows will never happen and generate object code accordingly. It is also possible for the same conforming implementation to emit code that exhibits different behavior in different contexts. For example, an implementation may determine that a signed integer loop control variable declared in a local scope cannot overflow and may emit efficient code on the basis of that determination, while the same implementation may determine that a global variable used in a similar context will wrap.

c/cert/src/rules/INT33-C/DivOrRemByZero.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ This query implements the CERT-C rule INT33-C:
55
> Ensure that division and remainder operations do not result in divide-by-zero errors
66
77

8-
98
## Description
109

1110
The C Standard identifies the following condition under which division and remainder operations result in [undefined behavior (UB)](https://wiki.sei.cmu.edu/confluence/display/c/BB.+Definitions#BB.Definitions-undefinedbehavior):

c/cert/src/rules/INT35-C/UseCorrectIntegerPrecisions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ This query implements the CERT-C rule INT35-C:
55
> Use correct integer precisions
66
77

8-
98
## Description
109

1110
Integer types in C have both a *size* and a *precision*. The size indicates the number of bytes used by an object and can be retrieved for any object or type using the `sizeof` operator. The precision of an integer type is the number of bits it uses to represent values, excluding any sign and padding bits.

0 commit comments

Comments
 (0)