ea9a62
From 19d73f67883c011cc74326a5dc34f7009efa60e1 Mon Sep 17 00:00:00 2001
ea9a62
From: Panu Matilainen <pmatilai@redhat.com>
ea9a62
Date: Tue, 6 Sep 2022 13:15:44 +0300
ea9a62
Subject: [PATCH] Fix buffer overrun from commit
ea9a62
 4420c78beb86cc67392274bf351478a3375626a2
ea9a62
ea9a62
The newly handled ^ needs to be accounted for when allocating memory.
ea9a62
Found when testing #1936, goes to show what a useful thing that is.
ea9a62
---
ea9a62
 lib/rpmdb.c | 1 +
ea9a62
 1 file changed, 1 insertion(+)
ea9a62
ea9a62
diff --git a/lib/rpmdb.c b/lib/rpmdb.c
ea9a62
index fd2b0671ae..b3c5da62d5 100644
ea9a62
--- a/lib/rpmdb.c
ea9a62
+++ b/lib/rpmdb.c
ea9a62
@@ -1107,6 +1107,7 @@ static char * mireDup(rpmTagVal tag, rpmMireMode *modep,
ea9a62
 	    case '.':
ea9a62
 	    case '+':
ea9a62
 	    case '*':
ea9a62
+	    case '^':
ea9a62
 		if (!brackets) nb++;
ea9a62
 		break;
ea9a62
 	    case '\\':