We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa44ced commit f5d5460Copy full SHA for f5d5460
cpp/ql/test/query-tests/Security/CWE/CWE-079/semmle/CgiXss/search.c
@@ -37,13 +37,13 @@ void good_server1(char* query) {
37
puts(do_search(query));
38
}
39
40
-int snprintf(char *, int, const char *, ...);
+int scanf(const char *, ...);
41
42
void good_server2(char* query) {
43
puts("<p>Query results for ");
44
// GOOD: Only an integer is added to the page.
45
int i = 0;
46
- snprintf(query, 16, "value=%i", &i);
+ sscanf(query, "value=%i", &i);
47
printf("\n<p>%i</p>\n", i);
48
49
0 commit comments