Skip to contentSkip to conversation

strncpy etc.

PATCH Kip Walker 1 participant 1 message Nov 18, 2002 MIPS

lore
Share & tools
lore

Kip Walker

author
#0 lore raw

Looks like a typo in include/asm-mips/string.h has strncpy returning the wrong thing -- a pointer to the END of the destination string, rather than the beginning of the destination string.

Patch for 2.4 is below:

Index: include/asm-mips/string.h
===================================================================
RCS file:
/projects/bbp/cvsroot/systemsw/linux/src/kernel/include/asm-mips/string.h,v retrieving revision 1.6

11/18 22:27:15 renamed from 09/05 22:15:51 1.6 +1 -1
diff -u -r1.6 string.h
@@ -67,7 +67,7 @@
         : "0" (__dest), "1" (__src), "2" (__n)
         : "memory");
 
-  return __dest;
+  return __xdest;
 }
 
 #define __HAVE_ARCH_STRCMP