]> granicus.if.org Git - sudo/commitdiff
deal with maxfilelen < 0 case
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 16 Jan 1997 00:05:55 +0000 (00:05 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 16 Jan 1997 00:05:55 +0000 (00:05 +0000)
logging.c

index 529b9dbe69f67148f35fa91a7f603e529f84db6d..b3eeced5dc302ce65ac4968d226659dd1123597c 100644 (file)
--- a/logging.c
+++ b/logging.c
@@ -374,7 +374,7 @@ void log_error(code)
            oldend = end;
            end = strchr(oldend, ' ');
 
-           if (end) {
+           if (maxlen > 0 && end) {
                *end = '\0';
                if (strlen(beg) > maxlen) {
                    /* too far, need to back up & print the line */