mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
C++: Ignore gets'es with incorrect parameter counts
This commit is contained in:
@@ -36,7 +36,7 @@ char *gets(char *s);
|
||||
|
||||
void testGets() {
|
||||
char buf1[1024];
|
||||
char buf2 = malloc(1024);
|
||||
char *buf2 = malloc(1024);
|
||||
char *s;
|
||||
|
||||
gets(buf1); // BAD: use of gets
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
char *gets();
|
||||
|
||||
void testOtherGets() {
|
||||
char *s;
|
||||
|
||||
s = gets(); // GOOD: this is not the gets from stdio.h
|
||||
}
|
||||
Reference in New Issue
Block a user