Преглед на файлове

Added some build-time verification.

Patrick Trinkle преди 8 години
родител
ревизия
911a174f52
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      src/civetweb.c

+ 3 - 0
src/civetweb.c

@@ -6131,6 +6131,9 @@ mg_fgets(char *buf, size_t size, struct mg_file *filep, char **p)
  * to infinitely recurse and then crash.
  * to infinitely recurse and then crash.
  */
  */
 #define INITIAL_DEPTH 9
 #define INITIAL_DEPTH 9
+#if INITIAL_DEPTH <= 0
+#error Bad INITIAL_DEPTH for recursion, set to at least 1
+#endif
 
 
 struct read_auth_file_struct {
 struct read_auth_file_struct {
 	struct mg_connection *conn;
 	struct mg_connection *conn;