diff options
Diffstat (limited to 'src/blogc-runserver/httpd.c')
-rw-r--r-- | src/blogc-runserver/httpd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/blogc-runserver/httpd.c b/src/blogc-runserver/httpd.c index 195bad0..1312ec9 100644 --- a/src/blogc-runserver/httpd.c +++ b/src/blogc-runserver/httpd.c @@ -212,6 +212,11 @@ int br_httpd_run(const char *host, unsigned short port, const char *docroot, size_t max_threads) { + if (port == 0) { + fprintf(stderr, "Invalid port: 0\n"); + return 1; + } + thread_data_t threads[max_threads]; for (size_t i = 0; i < max_threads; i++) threads[i].initialized = false; |