]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Fix an error when processing NTLM user formatted name
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Sat, 23 Feb 2013 18:08:59 +0000 (19:08 +0100)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Sat, 23 Feb 2013 18:08:59 +0000 (19:08 +0100)
An uninitialized variable was used to split the user name when the format
was declared as NTLM.

readlog.c

index f3e3d7b57a64192eaaa7ad5be06e757efbf71650..60660e5899b4d2ae52235ebd949ca7b316a22dfe 100644 (file)
--- 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;
                                        }
                                }