[buffer] Make API take signed int length Since we already switched to accepting -1 as 'zero-terminated'.