Skip to content

Crashing on bad read #63

Description

@arandomdev

Sometimes when nfc.read() and it fails to read the NDEF records the arduino crashes.

Stacktrace:
nfc.read()
MifareUltralight(uid, uidLength)
NdefMessage(buffer, messageLength()CRASH!

I think the issue is when the messageLength is set to 0, so fix this I suggest that we change the comparison operator in NdefMessage.cpp from:

`
...

while (index <= numBytes)

...`

to
`...

while (index < numBytes)

...`

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions