Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yeggor committed Sep 30, 2024
1 parent 7b78f56 commit 0229483
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions efiXplorer/efi_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ struct efi_guid_t {
}

std::string to_string() const {
char res[37] = {0};
snprintf(res, sizeof(res),
char guid_str[37] = {0};
snprintf(guid_str, sizeof(guid_str),
"%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X", data1, data2,
data3, data4[0], data4[1], data4[2], data4[3], data4[4], data4[5],
data4[6], data4[7]);
return res;
return guid_str;
}
};

Expand Down
2 changes: 1 addition & 1 deletion efiXplorer/efi_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ bool efi_utils::check_install_protocol(ea_t ea) {
//--------------------------------------------------------------------------
// convert 64-bit value to hex string
std::string efi_utils::as_hex(uint64_t value) {
char hexstr[21] = {};
char hexstr[21] = {0};
snprintf(hexstr, sizeof(hexstr), "%" PRIX64, value);
return hexstr;
}
Expand Down

0 comments on commit 0229483

Please sign in to comment.