regedit: Fix a buffer allocation in export_registry_key().

This fixes a major buffer overflow bug in 'regedit /E'.
oldstable
Francois Gouget 2008-11-20 20:41:04 +01:00 committed by Alexandre Julliard
parent 9d4ab48750
commit d92c976803
1 changed files with 1 additions and 1 deletions

View File

@ -1239,7 +1239,7 @@ BOOL export_registry_key(WCHAR *file_name, WCHAR *reg_key_name, DWORD format)
val_name_buf = HeapAlloc(GetProcessHeap(), 0,
val_name_size * sizeof(*val_name_buf));
val_buf = HeapAlloc(GetProcessHeap(), 0, val_size);
line_buf = HeapAlloc(GetProcessHeap(), 0, line_buf_size);
line_buf = HeapAlloc(GetProcessHeap(), 0, line_buf_size * sizeof(*line_buf));
CHECK_ENOUGH_MEMORY(reg_key_name_buf && val_name_buf && val_buf && line_buf);
if (reg_key_name && reg_key_name[0]) {