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

bugfix t5577_write_with_pass #612

Merged
merged 1 commit into from Oct 3, 2023
Merged

Conversation

baugp
Copy link
Contributor

@baugp baugp commented Sep 26, 2023

What's new

  • bugfix in T5577 write function with password void t5577_write_with_pass(LFRFIDT5577* data, uint32_t password)
  • This PR Lfrfid t5577 #493 added the original code, but I believe it contains a bug.
  • There is no implementation that triggers the bug yet, so this improvement is just for future proofing.

Verification

  • Code review by comparing with t5577_write(LFRFIDT5577* data) in the same file t5577.c

Checklist (For Reviewer)

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

@xMasterX
Copy link
Member

xMasterX commented Oct 3, 2023

Thanks for finding that issue, actually this fix is not correct, we need to write password only in block zero, but this function allows us to make it write many times for no reason, i will remake functions to correct logic thanks!

@xMasterX xMasterX closed this Oct 3, 2023
@baugp
Copy link
Contributor Author

baugp commented Oct 3, 2023

actually this fix is not correct
I disagree with that. I believe the intent of this function is for writing into N consecutive blocks (starting from block zero) of T5577 while supplying a password to authenticate the writing request. It is analogous to function t5577_write but that version does not require password to authenticate it.
It is not only for writing password, but it can be also used to rewrite the whole content of the T5577 when it has a password protection mode enabled.

@xMasterX
Copy link
Member

xMasterX commented Oct 3, 2023

yea, that might be used in this way but function is used only in one place to write single block
okay, your solution seems better if we ever going to reuse that function in other places

@xMasterX xMasterX reopened this Oct 3, 2023
@xMasterX xMasterX merged commit e7ea821 into DarkFlippers:dev Oct 3, 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.

None yet

2 participants