rdoff/ldrdf.c: fix memory overflow errors causing build failures

The RDOFF tools are fundamentally broken to the core: they are
defining headers which contain misaligned structure members, which
cause the compiler to add padding, breaking the format.

This is just a build fix; remove RDOFF in 2.16.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2022-10-05 12:00:57 -07:00
parent f95c7e983c
commit 67fbb45816

View file

@ -735,7 +735,7 @@ static void write_output(const char *filename)
printf("\nadding generic record from binary file %s\n",
generic_rec_file);
hr = (rdfheaderrec *) nasm_malloc(sizeof(struct GenericRec));
nasm_new(hr);
if ((ff = fopen(generic_rec_file, "r")) == NULL) {
fprintf(stderr, "ldrdf: couldn't open %s for input\n",
generic_rec_file);
@ -772,7 +772,7 @@ static void write_output(const char *filename)
if (options.verbose)
printf("\nadding module name record %s\n", modname_specified);
hr = (rdfheaderrec *) nasm_malloc(sizeof(struct ModRec));
nasm_new(hr);
hr->m.type = RDFREC_MODNAME;
hr->m.reclen = n + 1;
strcpy(hr->m.modname, modname_specified);