diff options
author | midipix <writeonce@midipix.org> | 2024-05-01 02:30:43 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-05-01 02:33:54 +0000 |
commit | ae4fb541812386da97dd5b633f762f272f023b77 (patch) | |
tree | 4841eb8bf62986182116a31136996cfbea0c4b96 /src | |
parent | c0a8ed42c4f477c1e93dad35622e272fd7745c34 (diff) | |
download | mdso-ae4fb541812386da97dd5b633f762f272f023b77.tar.bz2 mdso-ae4fb541812386da97dd5b633f762f272f023b77.tar.xz |
mdso_objgen_dsometa(), mdso_objgen_symentry(): avoid var-length array member.
Diffstat (limited to 'src')
-rw-r--r-- | src/object/mdso_objgen_dsometa.c | 7 | ||||
-rw-r--r-- | src/object/mdso_objgen_symentry.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/object/mdso_objgen_dsometa.c b/src/object/mdso_objgen_dsometa.c index 162c2d2..138a4b3 100644 --- a/src/object/mdso_objgen_dsometa.c +++ b/src/object/mdso_objgen_dsometa.c @@ -18,6 +18,11 @@ #include "perk_consts.h" #include "perk_structs.h" +struct pe_raw_coff_strtbl_impl { + unsigned char cst_size [0x04]; + unsigned char cst_data [0x10]; +}; + struct mdso_unified_record { unsigned char data[80]; }; @@ -28,7 +33,7 @@ struct mdso_dsometa_object { struct mdso_unified_record rec[1]; struct pe_raw_coff_reloc rel[1]; struct pe_raw_coff_symbol sym[8]; - struct pe_raw_coff_strtbl cst; + struct pe_raw_coff_strtbl_impl cst; }; int mdso_objgen_dsometa( diff --git a/src/object/mdso_objgen_symentry.c b/src/object/mdso_objgen_symentry.c index 674272b..9303a1e 100644 --- a/src/object/mdso_objgen_symentry.c +++ b/src/object/mdso_objgen_symentry.c @@ -18,6 +18,11 @@ #include "perk_consts.h" #include "perk_structs.h" +struct pe_raw_coff_strtbl_impl { + unsigned char cst_size [0x04]; + unsigned char cst_data [0x10]; +}; + struct mdso_symfn_refs { unsigned char refs[16]; }; @@ -28,7 +33,7 @@ struct mdso_symentry_object { struct mdso_symfn_refs ref[1]; struct pe_raw_coff_reloc rel[2]; struct pe_raw_coff_symbol sym[9]; - struct pe_raw_coff_strtbl cst; + struct pe_raw_coff_strtbl_impl cst; }; static void mdso_obj_write_secoff(unsigned char * ch, uint64_t secoff) |