Commit d3fb5ca7 authored by Colin Walters's avatar Colin Walters Committed by Ray Strode

tests: Correct boundary test for overflow

The offset has to be strictly less than the max.
parent f69121b8
......@@ -326,7 +326,7 @@ struct entry *netgroup_iter_next(struct netgroup_iter *iter) {
// Grow the stack
if (iter->depth > NETGROUP_MAX_DEPTH) {
if (iter->depth >= NETGROUP_MAX_DEPTH) {
iter->depth = -1;
return NULL; // Too much recursion
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment