Jacek Caban (@jacek) commented about dlls/vbscript/global.c:
- hres = SafeArrayAccessData(sa, (void**)&data);
- if (FAILED(hres))
goto cleanup;
- str_array = (BSTR *)malloc((ubound - lbound + 1) * sizeof(BSTR));
- if (!str_array) {
hres = E_OUTOFMEMORY;
goto cleanup_data;
- }
- free_str_array = (BSTR *)calloc((ubound - lbound + 1), sizeof(BSTR));
- if (!free_str_array) {
hres = E_OUTOFMEMORY;
goto cleanup_data;
- }
- for (i = lbound; i <= ubound; i++) {
Sorry for not noticing it later, but looking at oleaut32 code, I think that we should iterate `data` pointer from 0 index here. I fixed that, changed a bit the style to be more consistent with vbscipt and created !7304. I hope it's fine for you. Thanks!