From 7d064dd249ee7ad006ceeabd05c8f1647d4e5c28 Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Mon, 7 Jul 2025 05:55:23 -0400 Subject: [PATCH] Adjusting code gor auth_plain --- lib/lvleml.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/lvleml.c b/lib/lvleml.c index da40fb6..40ea679 100644 --- a/lib/lvleml.c +++ b/lib/lvleml.c @@ -322,13 +322,11 @@ static char *get_auth_plain(CONTYP *contact,int delay,char *received) { #define OPEP "lvleml.c:get_auth_plain," + char *decoded; -char local[200]; decoded=(char *)0; -(void) memset(local,'\000',sizeof(local)); -(void) strncpy(local,received,sizeof(local)-1); -if (strlen(local)==0) { +if ((received==(char *)0)||(strlen(received)==0)) { char *line; int got; @@ -337,12 +335,12 @@ if (strlen(local)==0) { got=tcp_getline(contact->socptr,delay,&line); if (got>0) { (void) log_fprintlog(contact->logptr,false,"%s",line); - (void) strncpy(local,line,sizeof(local)-1); + decoded=cnv_getb64(line); line=rou_freestr(line); } } -if (strlen(local)>0) - decoded=cnv_getb64(local); +else + decoded=cnv_getb64(received); return decoded; #undef OPEP -- 2.47.3