Skip to content

Commit 8efdf35

Browse files
committed
C++: Fix some incorrect uses of 'const' in the tests.
1 parent 3641cdc commit 8efdf35

File tree

1 file changed

+5
-5
lines changed
  • cpp/ql/test/query-tests/Security/CWE/CWE-327

1 file changed

+5
-5
lines changed

cpp/ql/test/query-tests/Security/CWE/CWE-327/test2.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,32 +212,32 @@ void do_unseen_encrypts(char *data, size_t amount, keytype key)
212212
class desEncrypt
213213
{
214214
public:
215-
static void encrypt(const char *data);
215+
static void encrypt(char *data);
216216
static void doSomethingElse();
217217
};
218218

219219
class aes256Encrypt
220220
{
221221
public:
222-
static void encrypt(const char *data);
222+
static void encrypt(char *data);
223223
static void doSomethingElse();
224224
};
225225

226226
class desCipher
227227
{
228228
public:
229-
void encrypt(const char *data);
229+
void encrypt(char *data);
230230
void doSomethingElse();
231231
};
232232

233233
class aesCipher
234234
{
235235
public:
236-
void encrypt(const char *data);
236+
void encrypt(char *data);
237237
void doSomethingElse();
238238
};
239239

240-
void do_classes(const char *data)
240+
void do_classes(char *data)
241241
{
242242
desEncrypt::encrypt(data); // BAD
243243
aes256Encrypt::encrypt(data); // GOOD

0 commit comments

Comments
 (0)