Commit f71c4113 authored by Alexandre Julliard's avatar Alexandre Julliard

atl: Fix off-by-one buffer allocation.

parent b8489d5f
...@@ -549,7 +549,7 @@ static HRESULT WINAPI Registrar_AddReplacement(IRegistrar *iface, LPCOLESTR Key, ...@@ -549,7 +549,7 @@ static HRESULT WINAPI Registrar_AddReplacement(IRegistrar *iface, LPCOLESTR Key,
new_rep = HeapAlloc(GetProcessHeap(), 0, sizeof(rep_list)); new_rep = HeapAlloc(GetProcessHeap(), 0, sizeof(rep_list));
new_rep->key_len = lstrlenW(Key); new_rep->key_len = lstrlenW(Key);
new_rep->key = HeapAlloc(GetProcessHeap(), 0, new_rep->key_len*sizeof(OLECHAR)+1); new_rep->key = HeapAlloc(GetProcessHeap(), 0, (new_rep->key_len + 1) * sizeof(OLECHAR));
memcpy(new_rep->key, Key, (new_rep->key_len+1)*sizeof(OLECHAR)); memcpy(new_rep->key, Key, (new_rep->key_len+1)*sizeof(OLECHAR));
len = lstrlenW(item)+1; len = lstrlenW(item)+1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment