header_tagger(): Fix logging in case of two error conditions
authorFabian Keil <fk@fabiankeil.de>
Fri, 11 Sep 2020 12:30:58 +0000 (14:30 +0200)
committerFabian Keil <fk@fabiankeil.de>
Fri, 11 Sep 2020 14:35:40 +0000 (16:35 +0200)
Previously a character was passed to log_error() when a pointer
was expected. Apparently the conditions don't occur in the wild
so nobody noticed.

parsers.c

index 4306fdb..c6f50eb 100644 (file)
--- a/parsers.c
+++ b/parsers.c
@@ -1516,7 +1516,7 @@ static jb_err header_tagger(struct client_state *csp, char *header)
                assert(NULL != header);
                log_error(LOG_LEVEL_ERROR,
                   "Problems with tagger \'%s\' and header \'%s\': %s",
-                  b->name, *header, pcrs_strerror(hits));
+                  b->name, header, pcrs_strerror(hits));
             }
             freez(modified_tag);
          }
@@ -1547,7 +1547,7 @@ static jb_err header_tagger(struct client_state *csp, char *header)
                log_error(LOG_LEVEL_ERROR,
                   "Insufficient memory to add tag \'%s\', "
                   "based on tagger \'%s\' and header \'%s\'",
-                  tag, b->name, *header);
+                  tag, b->name, header);
             }
             else
             {