--- uClibc-0.9.28.3/libc/stdlib/realpath.c.orig 2008-04-28 13:06:02 +0000 +++ uClibc-0.9.28.3/libc/stdlib/realpath.c 2008-04-28 13:07:01 +0000 @@ -71,7 +71,8 @@ /* If it's a relative pathname use getcwd for starters. */ if (*path != '/') { /* Ohoo... */ - getcwd(new_path, PATH_MAX - 1); + if (getcwd(new_path, PATH_MAX - 1) == NULL) + return NULL; new_path += strlen(new_path); if (new_path[-1] != '/') *new_path++ = '/';