浏览代码

Don't try to send files larger than INT64_MAX

Part of #441 without merge conflict.
bel2125 8 年之前
父节点
当前提交
6adb3b695b
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/civetweb.c

+ 1 - 0
src/civetweb.c

@@ -8136,6 +8136,7 @@ handle_static_file_request(struct mg_connection *conn,
 		                   500,
 		                   500,
 		                   "Error: File size is too large to send\n%" INT64_FMT,
 		                   "Error: File size is too large to send\n%" INT64_FMT,
 		                   filep->stat.size);
 		                   filep->stat.size);
+		return;
 	}
 	}
 	cl = (int64_t)filep->stat.size;
 	cl = (int64_t)filep->stat.size;
 	conn->status_code = 200;
 	conn->status_code = 200;