From: Michael Schroeder Date: Thu, 22 Nov 2018 11:02:00 +0000 (+0100) Subject: Fix off-by-one error in the "oneof" parsing code X-Git-Tag: 0.7.2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0302dce36cb5066a5c818d616a047dc93cfd025d;p=thirdparty%2Flibsolv.git Fix off-by-one error in the "oneof" parsing code Fixes issue#289 --- 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++) {