Don't crash in iconv setup when getcwd fails.
This commit is contained in:
parent
d68eba500c
commit
d19df6ac5a
|
@ -1,3 +1,8 @@
|
|||
2015-02-25 Roland McGrath <roland@hack.frob.com>
|
||||
|
||||
* iconv/gconv_conf.c (__gconv_get_path): Don't crash if __getcwd
|
||||
returns a null pointer.
|
||||
|
||||
2015-02-25 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c: Define memcpy
|
||||
|
|
|
@ -468,7 +468,7 @@ __gconv_get_path (void)
|
|||
":", 1),
|
||||
default_gconv_path, sizeof (default_gconv_path));
|
||||
cwd = __getcwd (NULL, 0);
|
||||
cwdlen = strlen (cwd);
|
||||
cwdlen = __glibc_unlikely (cwd == NULL) ? 0 : strlen (cwd);
|
||||
}
|
||||
assert (default_gconv_path[0] == '/');
|
||||
|
||||
|
|
Loading…
Reference in New Issue