Use size out output buffer, not size of output pointer