Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed error when reading an iso15693 nfc tag with no blocks #3229

Merged
merged 2 commits into from
Dec 2, 2023

Conversation

pborsutzki
Copy link
Contributor

@pborsutzki pborsutzki commented Nov 19, 2023

Fixed a zero allocation error when reading an iso15693 nfc tag with no additional blocks.

What's new

When reading an iso15693 nfc tag that reports zero blocks, do not try to allocate memory for reading or try to read the inexistent blocks. This works around a hard crash of the flipper when reading e.g. a FreeStyle Libre 3 tag.

Verification

Try to read an iso15693 nfc tag that just has an UID but no additional data. The flipper should not crash. Previously it crashed when trying to allocate 0 bytes through malloc in simple_array_init.

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

Copy link
Member

@gornekich gornekich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@skotopes skotopes merged commit c6a14e1 into flipperdevices:dev Dec 2, 2023
9 checks passed
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.

3 participants