libsolv/0001-Fix-off-by-one-error-in-the-oneof-parsing-code.patch
Igor Gnatenko d6b7b25161
Backport fixes for autouninstall
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-11-30 15:24:00 +01:00

29 lines
834 B
Diff

From b3fa58877a2fa34dc594ba8ce4e3d8f16c0ce5b0 Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Thu, 22 Nov 2018 12:02:00 +0100
Subject: [PATCH 1/4] Fix off-by-one error in the "oneof" parsing code
Fixes issue#289
(cherry picked from commit 0302dce36cb5066a5c818d616a047dc93cfd025d)
---
ext/testcase.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ext/testcase.c b/ext/testcase.c
index ffc8b8ae..469218d3 100644
--- a/ext/testcase.c
+++ b/ext/testcase.c
@@ -1071,7 +1071,7 @@ testcase_str2job(Pool *pool, const char *str, Id *whatp)
Queue q;
job |= SOLVER_SOLVABLE_ONE_OF;
queue_init(&q);
- if (npieces > 3 && strcmp(pieces[2], "nothing") != 0)
+ if (npieces > 2 && strcmp(pieces[2], "nothing") != 0)
{
for (i = 2; i < npieces; i++)
{
--
2.19.2