Revert "Do not write beyond the bounds of the buffer."

This reverts commit 7ad7612085467544a65fa5f6e7183eb61e2e7b65.
Make pbuffer_unused give length of portion after data

Previously, pbuffer_unused erroneously gave back the size of the
allocated data that was not contained in buffer->data. After confering
with the original author, it became apparent that the pbuffer_unused
should refer to the length of the portion after the data up to the end
of the allocated area.