Skip to content

hal_esp32_i2c: fix dangling pointer bug - #426

Open
n-PPV wants to merge 1 commit into
MicrochipTech:mainfrom
n-PPV:fix-hal_esp32_i2c-dangling-pointer
Open

hal_esp32_i2c: fix dangling pointer bug#426
n-PPV wants to merge 1 commit into
MicrochipTech:mainfrom
n-PPV:fix-hal_esp32_i2c-dangling-pointer

Conversation

@n-PPV

@n-PPV n-PPV commented Aug 7, 2026

Copy link
Copy Markdown

Purpose of this pull request

Fixes #425

Current implementation left dangling pointer, which led to double free and heap poisoning in ESP32-C6 as described in #425. Assigned NULL to each pointer given as argument in i2c_master_bus_rm_device() after the call of the function.

Checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dangling pointer "dev_handle" in hal_esp32_i2c.c

1 participant