svn commit: trunk/uClibc/libc/stdlib

andersen at uclibc.org andersen at uclibc.org
Thu Feb 8 18:38:52 UTC 2007


Author: andersen
Date: 2007-02-08 10:38:50 -0800 (Thu, 08 Feb 2007)
New Revision: 17821

Log:
Miguel Angel Alvarez writes:

Hi. I have found a bug in realpath that did not allow me to use it with
symlinks. Although I am using 0.9.28.1, the bug is present in 0.9.28 and
also in the trunk.

I attach a suggested patch. Please let me know if the solution is correct.



Modified:
   trunk/uClibc/libc/stdlib/realpath.c


Changeset:
Modified: trunk/uClibc/libc/stdlib/realpath.c
===================================================================
--- trunk/uClibc/libc/stdlib/realpath.c	2007-02-08 18:37:31 UTC (rev 17820)
+++ trunk/uClibc/libc/stdlib/realpath.c	2007-02-08 18:38:50 UTC (rev 17821)
@@ -133,7 +133,7 @@
 				/* Make sure it's null terminated. */
 				*new_path = '\0';
 				strcpy(resolved_path, got_path);
-				return NULL;
+				return resolved_path;
 			}
 		} else {
 			/* Note: readlink doesn't add the null byte. */




More information about the uClibc-cvs mailing list