logd: prevent the buffer from being bigger than the maximum ubus size