View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000433 | file | General | public | 2023-03-14 12:58 | 2023-03-14 19:48 |
| Reporter | nix | Assigned To | christos | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Fixed in Version | 5.45 | ||||
| Summary | 0000433: Since f7a65db, ELF file magic is broken for all ELF files with a note section | ||||
| Description | The symptoms are simple: compiler@loom 7897 /usr/src/file/x86_64-silk/shai-build.silk% src/file src/.libs/libmagic.so.1.0.0 src/.libs/libmagic.so.1.0.0: ERROR: , dynamically linked Note section size too big (48 > 0) (Invalid argument) | ||||
| Steps To Reproduce | (see above) | ||||
| Additional Information | Caused by missing initialization of recently added ms->elf_shsize_max. Patch attached. | ||||
| Tags | No tags attached. | ||||
|
|
shsize-max.diff (442 bytes)
diff --git a/src/apprentice.c b/src/apprentice.c index db217875..0a20b668 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -578,6 +578,7 @@ file_ms_alloc(int flags) ms->indir_max = FILE_INDIR_MAX; ms->name_max = FILE_NAME_MAX; ms->elf_shnum_max = FILE_ELF_SHNUM_MAX; + ms->elf_shsize_max = FILE_ELF_SHSIZE_MAX; ms->elf_phnum_max = FILE_ELF_PHNUM_MAX; ms->elf_notes_max = FILE_ELF_NOTES_MAX; ms->regex_max = FILE_REGEX_MAX; |
|
|
Fixed, thanks! |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2023-03-14 12:58 | nix | New Issue | |
| 2023-03-14 12:58 | nix | File Added: shsize-max.diff | |
| 2023-03-14 19:48 | christos | Assigned To | => christos |
| 2023-03-14 19:48 | christos | Status | new => assigned |
| 2023-03-14 19:48 | christos | Status | assigned => resolved |
| 2023-03-14 19:48 | christos | Resolution | open => fixed |
| 2023-03-14 19:48 | christos | Fixed in Version | => 5.45 |
| 2023-03-14 19:48 | christos | Note Added: 0003917 |