Skip to content

Commit 5e955f6

Browse files
committed
Double check the dditable is checked even if the driver reports the api version
Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
1 parent 88a9e8c commit 5e955f6

4 files changed

Lines changed: 1668 additions & 0 deletions

File tree

scripts/templates/ldrddi_driver_ddi.cpp.mako

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ namespace loader_driver_ddi
6565
if (dditable->version < ${th.get_version(obj)}) {
6666
return ${X}_RESULT_ERROR_UNSUPPORTED_VERSION;
6767
}
68+
// Check that the driver has the function pointer table init
69+
if (dditable->${th.get_table_name(n, tags, obj)} == nullptr) {
70+
return ${X}_RESULT_ERROR_UNINITIALIZED;
71+
}
6872
auto ${th.make_pfn_name(n, tags, obj)} = dditable->${th.get_table_name(n, tags, obj)}->${th.make_pfn_name(n, tags, obj)};
6973
if( nullptr == ${th.make_pfn_name(n, tags, obj)} )
7074
return ${X}_RESULT_ERROR_UNINITIALIZED;

0 commit comments

Comments
 (0)