Use of uninitialized variable in combine_uri()

Gerald Pfeifer gerald at pfeifer.com
Tue Nov 2 17:51:03 CDT 2010


Hi Thomas,

the following change of yours 

  commit bced2e21dbc548ef9d41e3ff11384d7ad964c929
  Author: Thomas Mullaly <thomas.mullaly at gmail.com>
  Date:   Sat Oct 9 11:02:17 2010 -0400

    urlmon: Implemented base case for CoInternetCombineIUri.

introduces a new warning, use of uninitialized variable in the line
marked "HERE" below.

  +static HRESULT combine_uri(Uri *base, Uri *relative, DWORD flags, IUri **result
  +    Uri *ret;
  +    HRESULT hr;
  +    parse_data data;
  +
  +    /* Base case is when the relative Uri has a scheme name,
  +     * if it does, then 'result' will contain the same data
  +     * as the relative Uri.
  +     */
  +    if(relative->scheme_start > -1) {
  +        DWORD create_flags = 0;
  +
  +        memset(&data, 0, sizeof(parse_data));
  +
  +        data.uri = SysAllocString(relative->raw_uri);
  +        if(!data.uri) {
  +            IUri_Release(URI(ret)); <================== HERE
  +            *result = NULL;
  +            return E_OUTOFMEMORY;
  +        }



More information about the wine-devel mailing list