From 41fc99e70f42b168befd5e2d83e91b8b21bc8539 Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Mon, 7 Dec 2020 22:52:33 +0000 Subject: [PATCH] ldv-linux-3.0/module_get_put-drivers-gpu-drm-i915-i915.ko.cil.out: allocate memory The pointer var_group3 is eventually passed to `kfree`, and thus needs to point to heap-allocated memory to avoid memory safety issues. See also #1270. --- .../module_get_put-drivers-gpu-drm-i915-i915.ko.cil.out.c | 2 +- .../module_get_put-drivers-gpu-drm-i915-i915.ko.cil.out.i | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/c/ldv-linux-3.0/module_get_put-drivers-gpu-drm-i915-i915.ko.cil.out.c b/c/ldv-linux-3.0/module_get_put-drivers-gpu-drm-i915-i915.ko.cil.out.c index 7812c548fb2..ba02cc8f115 100644 --- a/c/ldv-linux-3.0/module_get_put-drivers-gpu-drm-i915-i915.ko.cil.out.c +++ b/c/ldv-linux-3.0/module_get_put-drivers-gpu-drm-i915-i915.ko.cil.out.c @@ -58904,7 +58904,7 @@ int main(void) struct drm_display_mode *var_group2 ; struct drm_display_mode *var_intel_hdmi_mode_fixup_7_p2 ; struct drm_display_mode *var_intel_hdmi_mode_set_4_p2 ; - struct drm_connector *var_group3 ; + struct drm_connector *var_group3 = ldv_malloc(sizeof(struct drm_connector)); bool var_intel_hdmi_detect_8_p1 ; struct drm_property *var_group4 ; uint64_t var_intel_hdmi_set_property_11_p2 ; diff --git a/c/ldv-linux-3.0/module_get_put-drivers-gpu-drm-i915-i915.ko.cil.out.i b/c/ldv-linux-3.0/module_get_put-drivers-gpu-drm-i915-i915.ko.cil.out.i index 77b800f5013..28ff1b170b7 100644 --- a/c/ldv-linux-3.0/module_get_put-drivers-gpu-drm-i915-i915.ko.cil.out.i +++ b/c/ldv-linux-3.0/module_get_put-drivers-gpu-drm-i915-i915.ko.cil.out.i @@ -55676,7 +55676,7 @@ int main(void) struct drm_display_mode *var_group2 ; struct drm_display_mode *var_intel_hdmi_mode_fixup_7_p2 ; struct drm_display_mode *var_intel_hdmi_mode_set_4_p2 ; - struct drm_connector *var_group3 ; + struct drm_connector *var_group3 = ldv_malloc(sizeof(struct drm_connector)); bool var_intel_hdmi_detect_8_p1 ; struct drm_property *var_group4 ; uint64_t var_intel_hdmi_set_property_11_p2 ;