teknoraver / rpms / rpm

Forked from rpms/rpm 3 months ago
Clone

Blame SOURCES/rpm-4.16.1.3-caret-query2.patch

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