Commit 1cd4fe3d by Tim Ruehsen Committed by Jeff Law

Fix read buffer overflow in split_directories

        * make-relative-prefix.c (split_directories):
        Return early on empty 'name'

From-SVN: r279068
parent 07045595
2019-12-06 Tim Ruehsen <tim.ruehsen@gmx.de>
* make-relative-prefix.c (split_directories):
Return early on empty 'name'
2019-11-16 Tim Ruehsen <tim.ruehsen@gmx.de>
* cp-demangle.c (d_print_init): Remove const from 4th param.
......
......@@ -122,6 +122,9 @@ split_directories (const char *name, int *ptr_num_dirs)
const char *p, *q;
int ch;
if (!*name)
return NULL;
/* Count the number of directories. Special case MSDOS disk names as part
of the initial directory. */
p = name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment