From ed56993302e589d5d06f61c95743dd6b2e079326 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 14 Apr 2019 19:26:41 +0200 Subject: [PATCH] web: fix out-of-bounds access if compiled with -DWITH_API=OFF (thanks Sonja) --- lib/web.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web.cpp b/lib/web.cpp index 955c19f1c..12351b028 100644 --- a/lib/web.cpp +++ b/lib/web.cpp @@ -259,7 +259,7 @@ void Web::start() logger->info("Starting sub-system: htdocs={}", htdocs.c_str()); /* update web root of mount point */ - mounts[1].origin = htdocs.c_str(); + mounts[ARRAY_LEN(mounts)-1].origin = htdocs.c_str(); context = lws_create_context(&ctx_info); if (context == nullptr)