On 2/8/21 5:57 AM, Peter Maydell wrote:
>>  void unlock_user(void *host_ptr, abi_ulong guest_addr, size_t len);
....
>> -    if (len > 0) {
>> -        memcpy(g2h_untagged(guest_addr), host_ptr, len);
>> +    if (len != 0) {
>> +        memcpy(host_ptr_conv, host_ptr, len);
>>      }
> 
> Why the change from checking >0 to checking !=0 ? I'd rather not
> have to go through and audit all the callsites to confirm none
> of them pass a "length-or-negative-errno" value here...

The comparison change should have happened with the type change to unsigned in
the previous patch.


r~

Reply via email to