From 94187a80bd60baab4b9c4b949ad820d730578123 Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Thu, 26 Oct 2017 21:53:58 -0400 Subject: [PATCH] Fix invalid pointer arithmetic. Reported by David Levine. --- uip/imaptest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uip/imaptest.c b/uip/imaptest.c index 0fa5e26b..f937cb55 100644 --- a/uip/imaptest.c +++ b/uip/imaptest.c @@ -417,7 +417,7 @@ parse_capability(const char *cap, unsigned int len) } for (i = 0; caplist[i] != NULL; i++) { - if (has_prefix(caplist[i], "AUTH=") && caplist[i] + 5 != '\0') { + if (has_prefix(caplist[i], "AUTH=") && *(caplist[i] + 5) != '\0') { if (saslmechs) { saslmechs = add(" ", saslmechs); } @@ -709,7 +709,7 @@ getline: if (has_prefix(line, cmdqueue->tag)) { cmd = cmdqueue; if (timestamp) - ts_report("Command execution time:", &cmd->start); + ts_report("Command execution time", &cmd->start); cmdqueue = cmd->next; free(cmd); } else { -- 2.56.0