Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9579a2f
change functions using UID and Key to use structs
henrygab Nov 13, 2025
72cf97c
prevent buffer overrun ... assert with clear message instead.
henrygab Nov 13, 2025
5fc6f52
More type safety for encrypt/decrypt
henrygab Nov 14, 2025
c60c15e
self-document `expr` --> `expiration`
henrygab Nov 14, 2025
4ce34c6
More type and bufferlen safety, and validation in bit manipulation ro…
henrygab Nov 14, 2025
319339b
UNTESTED: Add lots of helper functions to get data into / out of safl…
henrygab Nov 15, 2025
cb4ba66
framework for saflok selftest
henrygab Nov 15, 2025
a535bdb
list of needed self-test
henrygab Nov 15, 2025
1cfeb79
automated from `make style`
henrygab Nov 15, 2025
11eaa01
Saflok: Fix datetime math helpers
henrygab Nov 15, 2025
dcf7c2d
side-by-side check of new vs. old decoding
henrygab Nov 15, 2025
700a109
Saflok: remove redundant CLIParserFreE(ctx)
henrygab Nov 15, 2025
3d0fe23
improved messaging for cards w/o variable keys
henrygab Nov 15, 2025
444e192
more use of type-safe routines for getting properties.
henrygab Nov 15, 2025
3bf51b1
Migrate more fields to type-safe getter / setter routines
henrygab Nov 15, 2025
02056c9
Saflok - creation year is limited to 7 bits
henrygab Nov 15, 2025
87a144c
Comments, improved function names, use of common get_days_in_month() …
henrygab Nov 17, 2025
c98bf9a
Fix a few bugs
henrygab Nov 17, 2025
c5cec7b
Implement significant portions of saflok selftest
henrygab Nov 17, 2025
4cb20bd
saflok selftest -- get_/set_bitfield
henrygab Nov 17, 2025
3560850
revert removal of waveshare
henrygab Nov 17, 2025
b95a9cf
Saflok: Comment the two assert()s for why they are programmer errors …
henrygab Nov 17, 2025
559d63c
Fix regression in expiration date handling
henrygab Nov 17, 2025
4c10238
saflok - removal of assert() per iceman request
henrygab Nov 17, 2025
35afc30
saflok - remove trailing `\n` from calls to `PrintAndLogEx()`
henrygab Nov 17, 2025
af7ec87
fix typo
henrygab Nov 17, 2025
c0bc988
saflok - more self-test capabilities
henrygab Nov 18, 2025
7fd1179
one more api ... even if silly...
henrygab Nov 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions client/src/cmdhf14b.c
Original file line number Diff line number Diff line change
Expand Up @@ -2631,15 +2631,15 @@ int CmdHF14BNdefRead(const char *Cmd) {
}
// take offset from response
uint8_t offset = response[1];

// Parse CC data
uint8_t cc_data[resplen - 2];
memcpy(cc_data, response, sizeof(cc_data));
uint8_t file_id[2] = {cc_data[9], cc_data[10]};


uint16_t max_rapdu_size = (cc_data[3] << 8 | cc_data[4]) - 2;

max_rapdu_size = max_rapdu_size < sizeof(response) - 2 ? max_rapdu_size : sizeof(response) - 2;
// --------------- NDEF file reading ----------------
uint8_t aSELECT_FILE_NDEF[30];
Expand Down Expand Up @@ -2739,7 +2739,7 @@ int CmdHF14BNdefRead(const char *Cmd) {
PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf 14b ndefread -v`") " for more details"); // So far this prints absolutely nothing
}


// get total NDEF length before save. If fails, we save it all
size_t n = 0;
if (NDEFGetTotalLength(response + 2, resplen - 4, &n) != PM3_SUCCESS)
Expand Down
2 changes: 1 addition & 1 deletion client/src/cmdhfmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -5008,7 +5008,7 @@ void printKeyTableEx(size_t sectorscnt, sector_t *e_sector, uint8_t start_sector
_YELLOW_("H") ":Hardnested / "
_YELLOW_("C") ":statiCnested / "
_YELLOW_("A") ":keyA "
" )"
" )"
);
if (sectorscnt == 18) {
PrintAndLogEx(INFO, "( " _MAGENTA_("*") " ) These sectors used for signature. Lays outside of user memory");
Expand Down
Loading
Loading