There was a unsigned wrap around bug in the elasticarray resize code which could cause the buffer to become smaller than the given nsize. I don't really know if it could happen in practice or what problems could be caused in case it happens.
Added a comment explaining that another wrap around is actually handled as it was unclear from just the code.
Commits picked up from https://github.com/Tarsnap/tarsnap/pull/592.
Two things: