CPP: Replace PotentialBufferOverflow with OverrunWrite in the test.

This commit is contained in:
Geoffrey White
2019-02-08 09:45:30 +00:00
parent 7194121eae
commit 8a5bc24b36
6 changed files with 7 additions and 6 deletions

View File

@@ -0,0 +1,4 @@
| tests.cpp:258:2:258:8 | call to sprintf | This 'call to sprintf' operation requires 17 bytes but the destination is only 10 bytes. |
| tests.cpp:259:2:259:8 | call to sprintf | This 'call to sprintf' operation requires 17 bytes but the destination is only 10 bytes. |
| tests.cpp:272:2:272:8 | call to sprintf | This 'call to sprintf' operation requires 9 bytes but the destination is only 8 bytes. |
| tests.cpp:273:2:273:8 | call to sprintf | This 'call to sprintf' operation requires 9 bytes but the destination is only 8 bytes. |

View File

@@ -0,0 +1 @@
Security/CWE/CWE-120/OverrunWrite.ql

View File

@@ -0,0 +1 @@
| tests.cpp:287:2:287:8 | call to sprintf | This 'call to sprintf' operation may require 318 bytes because of float conversions, but the target is only 64 bytes. |

View File

@@ -0,0 +1 @@
Security/CWE/CWE-120/OverrunWriteFloat.ql

View File

@@ -1,5 +0,0 @@
| tests.cpp:258:2:258:8 | call to sprintf | This conversion may yield a string of length 17, which exceeds the allocated buffer size of 10 |
| tests.cpp:259:2:259:8 | call to sprintf | This conversion may yield a string of length 17, which exceeds the allocated buffer size of 10 |
| tests.cpp:272:2:272:8 | call to sprintf | This conversion may yield a string of length 9, which exceeds the allocated buffer size of 8 |
| tests.cpp:273:2:273:8 | call to sprintf | This conversion may yield a string of length 9, which exceeds the allocated buffer size of 8 |
| tests.cpp:287:2:287:8 | call to sprintf | This conversion may yield a string of length 318, which exceeds the allocated buffer size of 64 |

View File

@@ -1 +0,0 @@
Likely Bugs/Memory Management/PotentialBufferOverflow.ql