summaryrefslogtreecommitdiff
path: root/src/mod_wstunnel.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2022-12-08 14:55:19 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2022-12-10 11:58:14 -0500
commit73712b61a1be7d97c03c4f3d320443b437ccc949 (patch)
treec26ac6c3269c90035e23b587a52bbb2bb2f1712f /src/mod_wstunnel.c
parent2916573a98e94a730708435e87f26d8561f8d2d7 (diff)
downloadlighttpd-git-73712b61a1be7d97c03c4f3d320443b437ccc949.tar.gz
[mod_wstunnel] store value in tmp before byteswap
correct code for bigendian (if optimizer did not already detect and do the right thing)
Diffstat (limited to 'src/mod_wstunnel.c')
-rw-r--r--src/mod_wstunnel.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mod_wstunnel.c b/src/mod_wstunnel.c
index afd559c5..149163d0 100644
--- a/src/mod_wstunnel.c
+++ b/src/mod_wstunnel.c
@@ -714,8 +714,11 @@ static int create_MD5_sum(request_st * const r) {
(s)[1]=((u)>>16); \
(s)[2]=((u)>>8); \
(s)[3]=((u))
- ws_htole32((unsigned char *)(buf+0), buf[0]);
- ws_htole32((unsigned char *)(buf+1), buf[1]);
+ uint32_t u;
+ u = buf[0];
+ ws_htole32((unsigned char *)(buf+0), u);
+ u = buf[1];
+ ws_htole32((unsigned char *)(buf+1), u);
#endif
/*(overwrite buf[] with result)*/
MD5_once((unsigned char *)buf, buf, sizeof(buf));