vbscript: Fix for unchecked memory access.

This commit is contained in:
Thomas Faller 2015-05-23 18:58:00 +02:00 committed by Alexandre Julliard
parent 38f6919312
commit 06dfe8fcd6
1 changed files with 1 additions and 1 deletions

View File

@ -1827,7 +1827,7 @@ static HRESULT Global_InStrRev(vbdisp_t *This, VARIANT *args, unsigned args_cnt,
assert(2 <= args_cnt && args_cnt <= 4);
if(V_VT(args) == VT_NULL || V_VT(args+1) == VT_NULL || V_VT(args+2) == VT_NULL)
if(V_VT(args) == VT_NULL || V_VT(args+1) == VT_NULL || (args_cnt > 2 && V_VT(args+2) == VT_NULL))
return MAKE_VBSERROR(VBSE_ILLEGAL_NULL_USE);
hres = to_string(args, &str1);