throw error for oversized buffers