summaryrefslogtreecommitdiffstats
path: root/src/responder
diff options
context:
space:
mode:
Diffstat (limited to 'src/responder')
-rw-r--r--src/responder/nss/nsssrv_cmd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index 370c3d299..26a347365 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -1618,6 +1618,14 @@ static int nss_cmd_retpwent(struct cli_ctx *cctx, int num)
if (!n) break;
+ if (n < 0) {
+ DEBUG(SSSDBG_CRIT_FAILURE, ("BUG: Negative difference"
+ "[%d - %d = %d]\n", pdom->res->count, cctx->pwent_cur, n));
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Domain: %d (total %d)\n",
+ cctx->pwent_dom_idx, pctx->num));
+ break;
+ }
+
if (n > num) n = num;
msgs = &(pdom->res->msgs[cctx->pwent_cur]);