diff -ru nss.orig/nss/lib/certdb/crl.c nss/nss/lib/certdb/crl.c --- nss/lib/certdb/crl.c 2016-02-12 15:36:18.000000000 +0100 +++ nss/lib/certdb/crl.c 2016-02-23 20:57:17.067924598 +0100 @@ -1982,7 +1982,7 @@ return SECSuccess; } /* all CRLs are good, sort them by thisUpdate */ - qsort(cache->crls, cache->ncrls, sizeof(CachedCrl*), SortCRLsByThisUpdate); + if (cache->ncrls != 0) qsort(cache->crls, cache->ncrls, sizeof(CachedCrl*), SortCRLsByThisUpdate); if (cache->ncrls) { /* pick the newest CRL */