about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-01-16 14:17:46 -0500
committerJune McEnroe <june@causal.agency>2022-01-16 14:17:46 -0500
commit605f889ab57c3465523104812fbf3edeb1e513d9 (patch)
treebc725593f352dee73e9337ddc6fe520331d25acc
parentUse Cold for away notices in queries (diff)
downloadcatgirl-605f889ab57c3465523104812fbf3edeb1e513d9.tar.gz
catgirl-605f889ab57c3465523104812fbf3edeb1e513d9.zip
Avoid sending null byte in SASL PLAIN 2.0a
Woops! BASE64_SIZE is the size of the string buffer. Somehow ergo
is the only server software (that I know of) to reject the accidental
null byte.

Reported by smlavine.
-rw-r--r--handle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/handle.c b/handle.c
index 5d61081..e460c7c 100644
--- a/handle.c
+++ b/handle.c
@@ -219,7 +219,7 @@ static void handleAuthenticate(struct Message *msg) {
 	char b64[BASE64_SIZE(sizeof(buf))];
 	base64(b64, buf, len);
 	ircFormat("AUTHENTICATE ");
-	ircSend(b64, BASE64_SIZE(len));
+	ircSend(b64, BASE64_SIZE(len) - 1);
 	ircFormat("\r\n");
 
 	explicit_bzero(b64, sizeof(b64));
d>June McEnroe 2019-07-11Factor out clearJune McEnroe 2019-07-11Add bright option to shottyJune McEnroe 2019-07-11Output <b>, <i>, <u> in shottyJune McEnroe 2019-07-10Ignore SM and RMJune McEnroe 2019-07-09Add shotty man page and build itJune McEnroe 2019-07-09Add up -cJune McEnroe 2019-07-09Add options for default colors to shottyJune McEnroe 2019-07-08Use char literals consistentlyJune McEnroe?h=3.3.1p1'>3.3.1p1June McEnroe 2021-03-05build: Add OpenSSL includes to libcompatJune McEnroe Some compat sources (getentropy_linux.c for example) require OpenSSL. Reported by Robert Scheck. 2020-12-15Import LibreSSL 3.3.1June McEnroe 2020-11-24Import LibreSSL 3.3.0June McEnroe 2020-10-22Import LibreSSL 3.2.2June McEnroe 2020-09-29Import LibreSSL 3.2.1June McEnroe 2020-09-29import: Add m4/ax_add_fortify_source.m4June McEnroe 2020-08-05build: Add README.7 to EXTRA_DIST 3.2.0June McEnroe 2020-08-03doc: Indicate that only OpenSSL 1.1.1b and newer workJune McEnroe