1
Fork 0
mirror of https://github.com/naehrwert/scetool.git synced 2025-04-24 21:57:45 +00:00

Header parser fix 3

Another one
This commit is contained in:
Sorvigolova 2018-03-25 21:49:16 +04:00
parent 10204bc16c
commit 5596b99859
4 changed files with 7 additions and 6 deletions

Binary file not shown.

View file

@ -81,8 +81,8 @@
#define OPT_HEADER_TYPE_CAP_FLAGS 1
/*! Individuals seed header. */
#define OPT_HEADER_TYPE_INDIV_SEED 2
/*! Optional header 4. */
#define OPT_HEADER_TYPE_4 4
/*! Control flags header 4. */
#define OPT_HEADER_TYPE_CONTROL_FLAGS 4
/*! Metadata key/iv lengths. */
#define METADATA_INFO_KEYBITS 128

View file

@ -317,7 +317,7 @@ void _print_opt_header(FILE *fp, opt_header_t *oh)
else
{
u8 *h1 = (u8 *)oh + sizeof(opt_header_t);
_hexdump(fp, " Data", 0, h1, _ES32(oh->size) - sizeof(opt_header_t), FALSE);
_hexdump(fp, " Flags", 0, h1, _ES32(oh->size) - sizeof(opt_header_t), FALSE);
}
}
break;
@ -327,10 +327,10 @@ void _print_opt_header(FILE *fp, opt_header_t *oh)
_hexdump(fp, " Seed", 0, is, _ES32(oh->size) - sizeof(opt_header_t), FALSE);
}
break;
case OPT_HEADER_TYPE_4:
case OPT_HEADER_TYPE_CONTROL_FLAGS:
{
u8 *h4 = (u8 *)oh + sizeof(opt_header_t);
_hexdump(fp, " Data", 0, h4, _ES32(oh->size) - sizeof(opt_header_t), FALSE);
u8 *ctrlf = (u8 *)oh + sizeof(opt_header_t);
_hexdump(fp, " Flags", 0, ctrlf, _ES32(oh->size) - sizeof(opt_header_t), FALSE);
}
break;
}

View file

@ -53,6 +53,7 @@ id_to_name_t _optional_header_types[] =
{
{OPT_HEADER_TYPE_CAP_FLAGS, "Capability Flags"},
{OPT_HEADER_TYPE_INDIV_SEED, "Individuals Seed"},
{OPT_HEADER_TYPE_CONTROL_FLAGS, "Control Flags"},
{0, NULL}
};