[1/2] jscript: Return NULL if jsstr_substr fails.

Sebastian Lackner sebastian at fds-team.de
Tue Sep 6 08:26:52 CDT 2016


On 06.09.2016 12:27, Jacek Caban wrote:
> Hi Sebastian,
> 
> I took a deeper look at this. It seems that we have at least two more
> jsstr_alloc_buf callers to fix (jsstr_concat and
> JSGlobal_decodeURIComponent). All those seem to be mistakes caused by
> wrong choice of function signature, requiring not intuitive error
> handling. I'd prefer to change the root of those problems, making the
> function:
> jsstr_t *jsstr_alloc_buf(unsigned,WCHAR**)
> This should avoid similar mistakes in the future.
> 
> This will be much larger patch than you originally meant, so please let
> me know if you'd like to prepare a patch or should I take care of that.
> 
> Thanks,
> Jacek
> 
> 

Good catch. Yes, the current function signature makes it very easy to do
things wrong. If you want me to prepare an updated patch I can do that,
but I also don't mind if you want to prepare a patch yourself.

Best regards,
Sebastian




More information about the wine-devel mailing list