https://bugs.winehq.org/show_bug.cgi?id=37546
Bug ID: 37546 Summary: mshtml: Possible null pointer dereference: post_data (Cppcheck) Product: Wine Version: 1.7.30 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: mshtml Assignee: wine-bugs@winehq.org Reporter: 00cpxxx@gmail.com Distribution: ---
[dlls\mshtml\navigate.c:905]: (error) Possible null pointer dereference: post_data
890 if(!data_len) { 891 GlobalFree(data); 892 post_data = NULL; 893 }else if(post_data != data) { 894 char *new_data; 895 896 new_data = GlobalAlloc(0, data_len+1); 897 if(new_data) 898 memcpy(new_data, post_data, data_len); 899 GlobalFree(data); 900 if(!new_data) 901 return E_OUTOFMEMORY; 902 post_data = new_data; 903 } 904 905 post_data[data_len] = 0; 906 request_data->post_data = post_data; 907 request_data->post_data_len = data_len;
post_data is being set to NULL in line 892, in line 905 it's being used.