]> 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, 27 Jun 2019 14:16:13 +0000 (16:16 +0200)
Fixes issue#289

ext/testcase.c

index aa72a8d71b84b8fe2bde3eeda9cbc5bde3ca3c5a..3b7e32bf714043400a3f9c18dd23819dd8dc2765 100644 (file)
@@ -1068,7 +1068,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++)
            {