Check len against underflow that could cause heap overrun
Check len against underflow that could cause heap overrun

Caught by Georg Wicherski of Kaspersky Labs

Elastica/mongo-c-driver-legacy,HeliumProject/mongo-c,mongodb/mongo-c-driver-legacy,mongodb/mongo-c-driver-legacy,Elastica/mongo-c-driver-legacy,mongodb/mongo-c-driver-legacy,HeliumProject/mongo-c,HeliumProject/mongo-c,HeliumProject/mongo-c,mongodb/mongo-c-driver-legacy,Elastica/mongo-c-driver-legacy,Elastica/mongo-c-driver-legacy