[hackers] [quark] Ensure mod is properly initialized || sin
commit 21ec61991f3b73028ef4a102254d737684627a6b
Author: sin <sin_AT_2f30.org>
Date: Wed Aug 13 23:19:49 2014 +0100
Ensure mod is properly initialized
Fixes a segfault.
diff --git a/quark.c b/quark.c
index 43e976b..f5a74a3 100644
--- a/quark.c
+++ b/quark.c
_AT_@ -211,8 +211,9 @@ responsefile(void) {
if (req.type == GET)
writetext("
<html><body>"HttpNotFound"</body></html>
");
} else {
+ snprintf(mod, sizeof(mod), "%s", tstamp(st.st_mtim.tv_sec));
/* check if modified */
- if (!strcmp(reqmod, tstamp(st.st_mtim.tv_sec))
+ if (!strcmp(reqmod, mod)
&& !putresentry(HEADER, HttpNotModified, tstamp(0))) {
/* not modified, we're done here*/
status = 304;
Received on Thu Aug 14 2014 - 09:52:54 CEST
This archive was generated by hypermail 2.3.0
: Thu Aug 14 2014 - 10:00:13 CEST