https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92456
Bug ID: 92456 Summary: libiberty/make-relative-prefix.c: read buffer overflow in split_directories() Product: gcc Version: 9.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: tim.ruehsen at gmx dot de Target Milestone: --- Created attachment 47209 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47209&action=edit Patch proposal to fix the issue In L189 if (dirs[num_dirs - 1] == NULL) 'num_dirs' can be 0 if name is an empty string. Same in L129. The attached patch fixes both.