Merge "Fix read past end of malloc block in logd"