Browse Source

Don't try to send files larger than INT64_MAX

Part of #441 without merge conflict.
bel2125 8 năm trước cách đây
mục cha
commit
6adb3b695b
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      src/civetweb.c

+ 1 - 0
src/civetweb.c

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