[Bug plugins/101810] libiberty/simple-object-xcoff.c segmentation fault
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101810 --- Comment #3 from Alan Modra --- Making SYMESZ a size_t as the patch does, is a complete fix if the code is only compiled for 64-bit hosts where unsigned int is smaller than size_t. If compiled for 32-bit then the expression calculating buffer size can overflow leading to similar segfaults on fuzzed object files. As explained by the comment.
[Bug plugins/101810] libiberty/simple-object-xcoff.c segmentation fault
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101810 --- Comment #2 from Richard Biener --- How about fixing the places instad? Making SYMESZ a size_t looks like a complete fix?
[Bug plugins/101810] libiberty/simple-object-xcoff.c segmentation fault
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101810 --- Comment #1 from Alan Modra --- Created attachment 51272 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51272=edit Proposed fix