Skip to content

Commit ed56993

Browse files
committed
web: fix out-of-bounds access if compiled with -DWITH_API=OFF (thanks Sonja)
1 parent 002e473 commit ed56993

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/web.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ void Web::start()
259259
logger->info("Starting sub-system: htdocs={}", htdocs.c_str());
260260

261261
/* update web root of mount point */
262-
mounts[1].origin = htdocs.c_str();
262+
mounts[ARRAY_LEN(mounts)-1].origin = htdocs.c_str();
263263

264264
context = lws_create_context(&ctx_info);
265265
if (context == nullptr)

0 commit comments

Comments
 (0)