Skip to content

Fix off-by-one error in NdefAppletFull limit check - #22

Open
Pistonomaxime wants to merge 1 commit into
OpenJavaCard:masterfrom
Pistonomaxime:fix-ndef-applet-buffer-limit
Open

Fix off-by-one error in NdefAppletFull limit check#22
Pistonomaxime wants to merge 1 commit into
OpenJavaCard:masterfrom
Pistonomaxime:fix-ndef-applet-buffer-limit

Conversation

@Pistonomaxime

Copy link
Copy Markdown

Description

This PR fixes an off-by-one bug in NdefApplet.java at line 549.
The condition limit >= file.length incorrectly prevented accessing or writing the very last byte of the file.

Changes

  • Changed limit >= file.length to limit > file.length to allow boundary execution up to the exact file size.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant