summaryrefslogtreecommitdiffstats
path: root/patches/binutils-2.18/generic/gentoo/07_all_binutils-2.18-windres.patch
blob: 476aefdecb15ca44b3bdd15ee649fa76af6d0490 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
http://sourceware.org/bugzilla/show_bug.cgi?id=4987

---
 binutils/resrc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: binutils-2.18/binutils/resrc.c
===================================================================
--- binutils-2.18.orig/binutils/resrc.c
+++ binutils-2.18/binutils/resrc.c
@@ -437,7 +437,7 @@ read_rc_file (const char *filename, cons
   const char *fnquotes = (filename_need_quotes (filename) ? "\"" : "");
 
   /* Setup the default resource import path taken from input file.  */
-  if (strchr (filename, '/') != NULL || strchr (filename, '\\') != NULL)
+  if (filename != NULL && (strchr (filename, '/') != NULL || strchr (filename, '\\') != NULL))
     {
       char *e, *c;