Skip to content

Fix NULL pointer dereference in STM32 SPI construct#1

Closed
ChrisNourse wants to merge 1 commit into10.1.xfrom
fix-stm32-spi-null-deref-10.1.x
Closed

Fix NULL pointer dereference in STM32 SPI construct#1
ChrisNourse wants to merge 1 commit into10.1.xfrom
fix-stm32-spi-null-deref-10.1.x

Conversation

@ChrisNourse
Copy link
Copy Markdown
Owner

@ChrisNourse ChrisNourse commented Apr 7, 2026

Accidentally made PR on fork. See adafruit#10926

Move mark_deinit() before check_pins() so that self->sck is not
NULLed after check_pins sets it. The previous ordering caused a
NULL dereference of self->sck->altfn_index, crashing all STM32
boards that use SPI (including STM32F405 boards whose CIRCUITPY
filesystem lives on external SPI flash).

Fixes adafruit#10866

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ChrisNourse ChrisNourse closed this Apr 7, 2026
@ChrisNourse ChrisNourse deleted the fix-stm32-spi-null-deref-10.1.x branch April 8, 2026 07:49
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.

1 participant