Merge branch 'backport-4281-socks4a-buffer-overflow-glib-2-82' into 'glib-2-82'

Backport !4281 “gsocks4aproxy: Fix a single byte buffer overflow in connect messages” to glib-2-82

See merge request GNOME/glib!4282
This commit is contained in:
Philip Withnall 2024-09-19 20:51:27 +00:00
commit 211be419cf
2 changed files with 6 additions and 2 deletions

View File

@ -571,6 +571,8 @@ vs2017-x64:
- win32-ps
needs: []
variables:
GIT_SUBMODULE_STRATEGY: recursive
GIT_SUBMODULE_DEPTH: 1
PYTHONUTF8: "1"
script:
# FIXME: These should use --wrap-mode=nodownload but the Windows CI machines
@ -602,6 +604,8 @@ vs2017-x64-static:
- win32-ps
needs: []
variables:
GIT_SUBMODULE_STRATEGY: recursive
GIT_SUBMODULE_DEPTH: 1
PYTHONUTF8: "1"
script:
# FIXME: These should use --wrap-mode=nodownload but the Windows CI machines

View File

@ -79,9 +79,9 @@ g_socks4a_proxy_init (GSocks4aProxy *proxy)
* +----+----+----+----+----+----+----+----+----+----+....+----+------+....+------+
* | VN | CD | DSTPORT | DSTIP | USERID |NULL| HOST | | NULL |
* +----+----+----+----+----+----+----+----+----+----+....+----+------+....+------+
* 1 1 2 4 variable 1 variable
* 1 1 2 4 variable 1 variable 1
*/
#define SOCKS4_CONN_MSG_LEN (9 + SOCKS4_MAX_LEN * 2)
#define SOCKS4_CONN_MSG_LEN (10 + SOCKS4_MAX_LEN * 2)
static gint
set_connect_msg (guint8 *msg,
const gchar *hostname,