Fix read buffer overflow in split_directories
* make-relative-prefix.c (split_directories): Return early on empty 'name' From-SVN: r279068
This commit is contained in:
parent
070455950d
commit
1cd4fe3d43
@ -1,3 +1,8 @@
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user