libwebsockets: fix compilation with GCC 15

Upstream backport.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2025-07-12 19:57:55 -07:00
committed by Tianling Shen
parent d61e91016a
commit 5aff25eba6
2 changed files with 23 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libwebsockets
PKG_VERSION:=4.3.3
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)

View File

@@ -0,0 +1,22 @@
From 19bd6a5bf8e06e5bfa3b331e0aa8c6f9fa7e3459 Mon Sep 17 00:00:00 2001
From: Andy Green <andy@warmcat.com>
Date: Mon, 7 Jul 2025 14:03:49 +0100
Subject: [PATCH] ssh: set correct lengths for sigma and tau
---
plugins/ssh-base/crypto/chacha.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/plugins/ssh-base/crypto/chacha.c
+++ b/plugins/ssh-base/crypto/chacha.c
@@ -59,8 +59,8 @@ typedef struct chacha_ctx chacha_ctx;
a = PLUS(a,b); d = ROTATE(XOR(d,a), 8); \
c = PLUS(c,d); b = ROTATE(XOR(b,c), 7);
-static const char sigma[16] = "expand 32-byte k";
-static const char tau[16] = "expand 16-byte k";
+static const char sigma[17] = "expand 32-byte k";
+static const char tau[17] = "expand 16-byte k";
void
chacha_keysetup(chacha_ctx *x,const u8 *k,u32 kbits)