mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
C++: Add a test case involving an array.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:49:4:49:24 | call to my_des_implementation | call to my_des_implementation |
|
||||
| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:64:33:64:40 | ALGO_DES | invocation of macro ALGO_DES |
|
||||
| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:66:31:66:38 | ALGO_DES | invocation of macro ALGO_DES |
|
||||
| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:128:4:128:24 | call to my_des_implementation | call to my_des_implementation |
|
||||
| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:148:27:148:29 | DES | access of enum constant DES |
|
||||
| test2.cpp:49:4:49:24 | call to my_des_implementation | This file makes use of a broken or weak cryptographic algorithm (specified by $@). | test2.cpp:176:28:176:35 | ALGO_DES | invocation of macro ALGO_DES |
|
||||
|
||||
@@ -58,12 +58,12 @@ void encrypt_bad(char *data, size_t amount, keytype key, int algo)
|
||||
|
||||
void do_encrypts(char *data, size_t amount, keytype key)
|
||||
{
|
||||
|
||||
char data2[128];
|
||||
|
||||
encrypt_good(data, amount, key, ALGO_AES); // GOOD
|
||||
encrypt_bad(data, amount, key, ALGO_DES); // BAD
|
||||
|
||||
|
||||
encrypt_good(data2, 128, key, ALGO_AES); // GOOD
|
||||
encrypt_bad(data2, 128, key, ALGO_DES); // BAD
|
||||
}
|
||||
|
||||
// --- more involved CPP-style example ---
|
||||
|
||||
Reference in New Issue
Block a user