OSDN Git Service

libc: Fix l64a to return the correct buffer pointer
authorFilippo Arcidiacono <filippo.arcidiacono@st.com>
Wed, 3 Feb 2010 12:14:18 +0000 (07:14 -0500)
committerCarmelo Amoroso <carmelo.amoroso@st.com>
Wed, 3 Feb 2010 15:31:47 +0000 (16:31 +0100)
l64a was returning the pointer to the end of the internal
buffer instead of the start. This caused an infinite loop
in passwd application.

Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
libc/stdlib/l64a.c

index 5a1dc13..1f0dfb7 100644 (file)
@@ -52,5 +52,5 @@ char * l64a (long int n)
     }
   *p = '\0';
 
-  return p;
+  return result;
 }