Ownasaurus / Ownasaurus/TAStm32

Check for null pointer in latch train allocation

Open Beginner friendly
#72 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue
Dominant language
C
Stars
76
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Currently the returned pointer from malloc isnt checked to make sure it succeeded
it should probably return an error code over the serial port, tentatively il say 0xE0

https://github.com/Ownasaurus/TAStm32/blob/be2d5e5605b168ee1ee6df97c22e42be54286ff9/Src/serial_interface.c#L141

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Src/serial_interface.c around line 141 and inspect the latch train allocation path and its existing serial error handling. Check how malloc failures are handled elsewhere in the repository, then make the failure observable over serial with the proposed 0xE0 code. Done means allocation failure is checked and the normal path remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.