imm32: ImmGetDescriptionA return does not include NULL byte

Alexandre Julliard julliard at winehq.org
Thu Sep 26 13:16:54 CDT 2013


Aric Stewart <aric at codeweavers.com> writes:

> @@ -1684,7 +1684,7 @@ UINT WINAPI ImmGetDescriptionA(
>  
>    HeapFree( GetProcessHeap(), 0, buf );
>  
> -  return len;
> +  return min( len - 1, uBufLen );
>  }

This may do the right thing on failure, but in an ugly way. A few
overflow tests would be a good idea.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list