Blame SOURCES/dovecot-2.3.13-CVE_2020_25275-part6.patch

2c808a
From 7a70f01fe8084431901433a2f74cb9c70fd00568 Mon Sep 17 00:00:00 2001
2c808a
From: Timo Sirainen <timo.sirainen@open-xchange.com>
2c808a
Date: Mon, 17 Aug 2020 18:26:01 +0300
2c808a
Subject: [PATCH] lib-imap: Add imap_parser_client_read_tag()
2c808a
2c808a
---
2c808a
 src/lib-imap/imap-parser.c | 6 ++++++
2c808a
 src/lib-imap/imap-parser.h | 5 +++++
2c808a
 2 files changed, 11 insertions(+)
2c808a
2c808a
diff --git a/src/lib-imap/imap-parser.c b/src/lib-imap/imap-parser.c
2c808a
index 52d79282fa..cc283f5c06 100644
2c808a
--- a/src/lib-imap/imap-parser.c
2c808a
+++ b/src/lib-imap/imap-parser.c
2c808a
@@ -1014,3 +1014,9 @@ int imap_parser_read_command_name(struct imap_parser *parser,
2c808a
 {
2c808a
 	return imap_parser_read_next_atom(parser, FALSE, name_r);
2c808a
 }
2c808a
+
2c808a
+int imap_parser_client_read_tag(struct imap_parser *parser,
2c808a
+				const char **tag_r)
2c808a
+{
2c808a
+	return imap_parser_read_next_atom(parser, FALSE, tag_r);
2c808a
+}
2c808a
diff --git a/src/lib-imap/imap-parser.h b/src/lib-imap/imap-parser.h
2c808a
index 5e09d61d2b..cd3748c00f 100644
2c808a
--- a/src/lib-imap/imap-parser.h
2c808a
+++ b/src/lib-imap/imap-parser.h
2c808a
@@ -108,5 +108,10 @@ int imap_parser_read_tag(struct imap_parser *parser, const char **tag_r);
2c808a
    needed, -1 if input isn't a valid command name string. */
2c808a
 int imap_parser_read_command_name(struct imap_parser *parser,
2c808a
 				  const char **name_r);
2c808a
+/* For IMAP clients: Read the command tag, which could also be "+" or "*".
2c808a
+   Returns 1 if tag was returned, 0 if more data is needed, -1 if input isn't
2c808a
+   valid. */
2c808a
+int imap_parser_client_read_tag(struct imap_parser *parser,
2c808a
+				const char **tag_r);
2c808a
 
2c808a
 #endif