fixed a crash issued by an invalid printf call
Costa Tsaousis (ktsaou) committed
Mar 30, 2016 at 02:28 UTC
63df49163257417f008c5fe4e7ee90ce0bb75985
1 file changed
+1
-1
src/web_client.c
+1
-1
@@ -268,7 +268,7 @@ int mysendfile(struct web_client *w, char *filename)
268
for(s = filename; *s ;s++) {
269
if( !isalnum(*s) && *s != '/' && *s != '.' && *s != '-' && *s != '_') {
270
debug(D_WEB_CLIENT_ACCESS, "%llu: File '%s' is not acceptable.", w->id, filename);
271
- buffer_sprintf(w->response.data, "File '%s' cannot be served. Filename contains invalid character '%c'", *s);
271
+ buffer_sprintf(w->response.data, "File '%s' cannot be served. Filename contains invalid character '%c'", filename, *s);
272
return 400;
273
}
274
}