|
From: | Gisle Vanem |
Subject: | Re: [Bug-wget] [patch] uuid generation in warc.c |
Date: | Sat, 14 Feb 2015 14:33:20 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.3; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0 SeaMonkey/2.32.1 |
Eli Zaretskii wrote:
+ if (rpc_uuid_avail == -1) + { + HMODULE hm_rpcrt4 = LoadLibrary ("Rpcrt4.dll"); + + if (hm_rpcrt4) + { + pfn_UuidCreate = + (UuidCreate_proc) GetProcAddress (hm_rpcrt4, "UuidCreate"); + pfn_UuidToString = + (UuidToString_proc) GetProcAddress (hm_rpcrt4, "UuidToStringA"); + pfn_RpcStringFree = + (RpcStringFree_proc) GetProcAddress (hm_rpcrt4, "RpcStringFreeA"); + if (pfn_UuidCreate && pfn_UuidToString && pfn_RpcStringFree) + rpc_uuid_avail = 1; + else + rpc_uuid_avail = 0; + }
Shouldn't there be an: else rpc_uuid_avail = 0; for the 'if (hm_rpcrt4)' part.
+ } + + if (rpc_uuid_avail) + {
Otherwise that can bomb. Or write: + if (rpc_uuid_avail > 0) + { + BYTE *uuid_str; + UUID uuid; Otherwise it looks good! -- --gv
[Prev in Thread] | Current Thread | [Next in Thread] |