snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit abca46d03745ecf563011f79368d9d162f5637db
parent 6e28a810e1159410051e8275d051448658abb0d6
Author: default <nobody@localhost>
Date:   Tue, 18 Oct 2022 11:24:53 +0200

xs_base64_dec() can now be used as a string, so do it.

Diffstat:
Mhtml.c | 6+-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/html.c b/html.c @@ -24,11 +24,7 @@ int login(snac *snac, char *headers) xs *s1 = xs_crop(xs_dup(auth), 6, 0); xs *s2 = xs_base64_dec(s1, &sz); - /* copy to asciiz it */ - xs *s3 = calloc(sz + 1, 1); - memcpy(s3, s2, sz); - - xs *l1 = xs_split_n(s3, ":", 1); + xs *l1 = xs_split_n(s2, ":", 1); if (xs_list_len(l1) == 2) { logged_in = check_password(