Merge pull request #3052 from aaronjamt/hex_conv_cleanup

Bytes->Hex conversions cleanup
This commit is contained in:
Iceman authored and GitHub committed 2025-12-20 22:10:45 +01:00
commit 0cee5705f6
4 files changed
+26 -60

No files matched your search

+6 -10
View File
@@ -1542,12 +1542,10 @@ static int CmdHfSeosPACS(const char *Cmd) {
// convert OID hex to literal string
char oid_buffer[256] = "";
for (int i = 0; i < oid_len; i++) {
sprintf(oid_buffer + (i * 2), "%02X", oid_hex[i]);
}
unsigned char oid_buffer[256] = "";
hex_to_buffer(oid_buffer, oid_hex, oid_len, 256, 0, 0, 1);
const char *oid = oid_buffer;
const unsigned char *oid = oid_buffer;
if (oid_len == 0) {
PrintAndLogEx(ERR, "OID value must be supplied");
@@ -1665,12 +1663,10 @@ static int CmdHfSeosADF(const char *Cmd) {
}
// convert OID hex to literal string
char oid_buffer[256] = "";
for (int i = 0; i < oid_len; i++) {
sprintf(oid_buffer + (i * 2), "%02X", oid_hex[i]);
}
unsigned char oid_buffer[256] = "";
hex_to_buffer(oid_buffer, oid_hex, oid_len, 256, 0, 0, 1);
const char *oid = oid_buffer;
const unsigned char *oid = oid_buffer;
if (oid_len == 0) {
PrintAndLogEx(ERR, "OID value must be supplied");