  Consider the divisor sum $\sum_{n\leq N}\tau(n^2+2bn+c)$ for integers $b$ and
$c$ which satisfy certain extra conditions. For this average sum we obtain an
explicit upper bound, which is close to the optimal. As an application we
improve the maximal possible number of $D(-1)$-quadruples.
