Fix return value bug of csp_buffer_get when out of buffers