Updated Portuguese translation for the BFD sub-directory
[binutils-gdb.git] / libiberty / make-relative-prefix.c
index eebcff9957e357f124e46841e1b7cf2c7368d9d6..ef932ff022e7e31dfd058a892ab3f8ce6af37aaf 100644 (file)
@@ -1,5 +1,5 @@
 /* Relative (relocatable) prefix support.
-   Copyright (C) 1987-2018 Free Software Foundation, Inc.
+   Copyright (C) 1987-2021 Free Software Foundation, Inc.
 
 This file is part of libiberty.
 
@@ -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;