]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Fix off-by-one error in the "oneof" parsing code
authorMichael Schroeder <mls@suse.de>
Thu, 22 Nov 2018 11:02:00 +0000 (12:02 +0100)
committerMichael Schroeder <mls@suse.de>
Thu, 22 Nov 2018 11:02:00 +0000 (12:02 +0100)
Fixes issue#289

ext/testcase.c

index ffc8b8ae4a1174a06d8a14ee622e640c966e43db..469218d3b7938664190b1e3ee9275e1a6af1eb29 100644 (file)
@@ -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++)
            {