From: Frederic Marchal Date: Sat, 23 Feb 2013 18:08:59 +0000 (+0100) Subject: Fix an error when processing NTLM user formatted name X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e9ecdd7fca413030a79fd89beded567ee33fe0d0;p=thirdparty%2Fsarg.git Fix an error when processing NTLM user formatted name An uninitialized variable was used to split the user name when the format was declared as NTLM. --- diff --git a/readlog.c b/readlog.c index f3e3d7b..60660e5 100644 --- a/readlog.c +++ b/readlog.c @@ -137,7 +137,6 @@ static void ReadOneLogFile(struct ReadLogDataStruct *Filter,const char *arq) longline line; char *linebuf; char *str; - char user[MAX_USER_LEN]; char hora[30]; char dia[128]=""; char wuser[MAXLEN]; @@ -498,7 +497,7 @@ static void ReadOneLogFile(struct ReadLogDataStruct *Filter,const char *arq) } else { strlow(log_entry.User); if(NtlmUserFormat == NTLMUSERFORMAT_USER) { - if ((str=strchr(user,'+'))!=NULL || (str=strchr(user,'\\'))!=NULL || (str=strchr(user,'_'))!=NULL) { + if ((str=strchr(log_entry.User,'+'))!=NULL || (str=strchr(log_entry.User,'\\'))!=NULL || (str=strchr(log_entry.User,'_'))!=NULL) { log_entry.User=str+1; } }