[PATCH v3 2/2] riched20: Only pass valid length to ME_InsertTextFromCursor

Fabian Maurer dark.shadow4 at web.de
Tue Jan 10 12:14:07 CST 2017

On Tuesday, January 10, 2017 10:07:48 AM CET Huw Davies wrote:
> I'm not convinced this is an improvement.
I figured it would be nice for uniformity. I find it cleaner to always calculate 
the size before - or in the function. Currently we have only 2 cases where the 
size is calculated inside, in all other cases it's passed.

As it is now, you can pass the function a null pointer, but only if the length 
is 0. If length is >0, or -1, it crashes.
After my patch, the function requires the length being set properly, but 
always works with a nullpointer.


More information about the wine-devel mailing list