Allocating 0-length buffers

It's convenient to allow 0-size buffers to be allocated to
avoid special-cases elsewhere in the code.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>