Skip to content

Comments

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

Merged
skotopes merged 2 commits intoflipperdevices:devfrom
pborsutzki:nfc_iso15693_no_blocks_fix
Dec 2, 2023
Merged

Fixed error when reading an iso15693 nfc tag with no blocks#3229
skotopes merged 2 commits intoflipperdevices:devfrom
pborsutzki:nfc_iso15693_no_blocks_fix

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
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