realpath bug
Miguel Angel Alvarez
ma.alvarez at ziv.es
Wed Feb 7 04:50:01 PST 2007
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.
Signed-off-by: Miguel Angel Alvarez <ma.alvarez at ziv.es>
diff -urP uClibc-0.9.28.1/libc/stdlib/realpath.c
uClibc-0.9.28.1_patched/libc/stdlib/realpath.c
--- uClibc-0.9.28.1/libc/stdlib/realpath.c 2007-01-26
00:54:19.000000000 +0100
+++ uClibc-0.9.28.1_patched/libc/stdlib/realpath.c 2007-02-07
13:46:18.000000000 +0100
@@ -130,7 +130,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. */
----------------------------------------- PLEASE NOTE -------------------------------------------
This message, along with any attachments, may be confidential or legally privileged.
It is intended only for the named person(s), who is/are the only authorized recipients.
If this message has reached you in error, kindly destroy it without review and notify the sender immediately.
Thank you for your help.
ZIV uses virus scanning software but excludes any liability for viruses contained in any attachment.
------------------------------------ ROGAMOS LEA ESTE TEXTO -------------------------------
Este mensaje y sus anexos pueden contener información confidencial y/o con derecho legal.
Está dirigido únicamente a la/s persona/s o entidad/es reseñadas como único destinatario autorizado.
Si este mensaje le hubiera llegado por error, por favor elimínelo sin revisarlo ni reenviarlo y notifíquelo inmediatamente al remitente. Gracias por su colaboración.
ZIV utiliza software antivirus, pero no se hace responsable de los virus contenidos en los ficheros anexos.
More information about the uClibc
mailing list