Check C API structure sizes before copying values to C++ classes (fixes issue #3238)

This commit is contained in:
Sergey Markelov
2021-12-14 14:37:54 -07:00
committed by Marshall Greenblatt
parent db9298fd3e
commit 5c0895e27f
5 changed files with 49 additions and 1 deletions

View File

@ -266,6 +266,9 @@ def format_translation_includes(header, body):
if body.find('cef_api_hash(') > 0:
result += '#include "include/cef_api_hash.h"\n'
if body.find('template_util::has_valid_size(') > 0:
result += '#include "libcef_dll/template_util.h"\n'
# identify what CppToC classes are being used
p = re.compile('([A-Za-z0-9_]{1,})CppToC')
list = sorted(set(p.findall(body)))