mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-15 10:29:47 +00:00
silence CodeQL
This commit is contained in:
1 parent
17e2d49c43
commit
395a51eeca
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -7989,7 +7989,7 @@ static char *mg_ssi(const char *path, const char *root, int depth) {
|
||||
if (intag && ch == '>' && buf[len - 1] == '-' && buf[len - 2] == '-') {
|
||||
buf[len++] = (char) (ch & 0xff);
|
||||
buf[len] = '\0';
|
||||
if (sscanf(buf, "<!--#include file=\"%[^\"]", arg)) {
|
||||
if (sscanf(buf, "<!--#include file=\"%[^\"]", arg) > 0) {
|
||||
char tmp[MG_PATH_MAX + MG_SSI_BUFSIZ + 10],
|
||||
*p = (char *) path + strlen(path), *data;
|
||||
while (p > path && p[-1] != MG_DIRSEP && p[-1] != '/') p--;
|
||||
@@ -8001,7 +8001,7 @@ static char *mg_ssi(const char *path, const char *root, int depth) {
|
||||
} else {
|
||||
MG_ERROR(("%s: file=%s error or too deep", path, arg));
|
||||
}
|
||||
} else if (sscanf(buf, "<!--#include virtual=\"%[^\"]", arg)) {
|
||||
} else if (sscanf(buf, "<!--#include virtual=\"%[^\"]", arg) > 0) {
|
||||
char tmp[MG_PATH_MAX + MG_SSI_BUFSIZ + 10], *data;
|
||||
mg_snprintf(tmp, sizeof(tmp), "%s%s", root, arg);
|
||||
if (depth < MG_MAX_SSI_DEPTH &&
|
||||
|
||||
@@ -23,7 +23,7 @@ static char *mg_ssi(const char *path, const char *root, int depth) {
|
||||
if (intag && ch == '>' && buf[len - 1] == '-' && buf[len - 2] == '-') {
|
||||
buf[len++] = (char) (ch & 0xff);
|
||||
buf[len] = '\0';
|
||||
if (sscanf(buf, "<!--#include file=\"%[^\"]", arg)) {
|
||||
if (sscanf(buf, "<!--#include file=\"%[^\"]", arg) > 0) {
|
||||
char tmp[MG_PATH_MAX + MG_SSI_BUFSIZ + 10],
|
||||
*p = (char *) path + strlen(path), *data;
|
||||
while (p > path && p[-1] != MG_DIRSEP && p[-1] != '/') p--;
|
||||
@@ -35,7 +35,7 @@ static char *mg_ssi(const char *path, const char *root, int depth) {
|
||||
} else {
|
||||
MG_ERROR(("%s: file=%s error or too deep", path, arg));
|
||||
}
|
||||
} else if (sscanf(buf, "<!--#include virtual=\"%[^\"]", arg)) {
|
||||
} else if (sscanf(buf, "<!--#include virtual=\"%[^\"]", arg) > 0) {
|
||||
char tmp[MG_PATH_MAX + MG_SSI_BUFSIZ + 10], *data;
|
||||
mg_snprintf(tmp, sizeof(tmp), "%s%s", root, arg);
|
||||
if (depth < MG_MAX_SSI_DEPTH &&
|
||||
|
||||
Reference in new issue
Block a user