From a59aaf6af967841b2f6c6da26e2be40d2f54d3f5 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 30 Apr 2020 20:26:19 +0100 Subject: [PATCH] strexp: reset out offset each time A second strexp mustn't inherit the offset of the first, completed one --- CMakeLists.txt | 2 +- lib/core/libwebsockets.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b424af93..6e4d0051a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -327,7 +327,7 @@ set(PACKAGE "libwebsockets") set(CPACK_PACKAGE_NAME "${PACKAGE}") set(CPACK_PACKAGE_VERSION_MAJOR "4") set(CPACK_PACKAGE_VERSION_MINOR "0") -set(CPACK_PACKAGE_VERSION_PATCH "3") +set(CPACK_PACKAGE_VERSION_PATCH "4") set(CPACK_PACKAGE_RELEASE 1) set(CPACK_GENERATOR "RPM") set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") diff --git a/lib/core/libwebsockets.c b/lib/core/libwebsockets.c index 5745f0fb3..75de923fd 100644 --- a/lib/core/libwebsockets.c +++ b/lib/core/libwebsockets.c @@ -938,6 +938,7 @@ lws_strexp_expand(lws_strexp_t *exp, const char *in, size_t len, if (*in == '{') { exp->state = LWS_EXPS_NAME_OR_CLOSE; exp->name_pos = 0; + exp->exp_ofs = 0; break; } /* treat as a literal */