mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-27 20:48:29 +00:00
Casting to int in mg_sprintf() call in handle_cgi
This commit is contained in:
1 parent
ddbe690698
commit
1957879e10
1 file changed
+1
-1
+1
-1
@@ -1141,7 +1141,7 @@ static void open_cgi_endpoint(struct connection *conn, const char *prog) {
|
|||||||
if ((p = strrchr(prog, '/')) == NULL) {
|
if ((p = strrchr(prog, '/')) == NULL) {
|
||||||
mg_snprintf(dir, sizeof(dir), "%s", ".");
|
mg_snprintf(dir, sizeof(dir), "%s", ".");
|
||||||
} else {
|
} else {
|
||||||
mg_snprintf(dir, sizeof(dir), "%.*s", p - prog, prog);
|
mg_snprintf(dir, sizeof(dir), "%.*s", (int) (p - prog), prog);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to create socketpair in a loop until success. mg_socketpair()
|
// Try to create socketpair in a loop until success. mg_socketpair()
|
||||||
|
|||||||
Reference in new issue
Block a user