diff options
author | Colin Walters <walters@verbum.org> | 2015-06-03 16:31:12 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2018-04-02 17:32:25 -0400 |
commit | d3fb5ca7b6cc592e71d94f8fc784b0316bdba139 (patch) | |
tree | 6593c9cab7e6b78f5c6c15a3f020fb99418d6764 | |
parent | f69121b84ca4c47e51877b53d073cf0408bf34ea (diff) | |
download | polkit-d3fb5ca7b6cc592e71d94f8fc784b0316bdba139.tar.gz |
tests: Correct boundary test for overflow
The offset has to be strictly less than the max.
https://bugs.freedesktop.org/show_bug.cgi?id=87716
-rw-r--r-- | test/mocklibc/src/netgroup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/mocklibc/src/netgroup.c b/test/mocklibc/src/netgroup.c index bc99555..06a8a89 100644 --- a/test/mocklibc/src/netgroup.c +++ b/test/mocklibc/src/netgroup.c @@ -326,7 +326,7 @@ struct entry *netgroup_iter_next(struct netgroup_iter *iter) { // Grow the stack iter->depth++; - if (iter->depth > NETGROUP_MAX_DEPTH) { + if (iter->depth >= NETGROUP_MAX_DEPTH) { iter->depth = -1; return NULL; // Too much recursion } |