If a backend returns negative hit count, then avoid comparisons against
smallSetUpperBound and largeSetLowerBound. Otherwise a negative size
in call to odr_malloc will occur.
comp.which = Z_RecordComp_simple;
/* how many records does the user agent want, then? */
- if (bsrt->hits <= *req->smallSetUpperBound)
+ if (bsrt->hits < 0)
+ *toget = 0;
+ else if (bsrt->hits <= *req->smallSetUpperBound)
{
*toget = bsrt->hits;
if ((comp.u.simple = req->smallSetElementSetNames))