Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src/sys/arch/powerpc/booke Pull up following revision(s) (req...



details:   https://anonhg.NetBSD.org/src/rev/20bc17754d8e
branches:  netbsd-6
changeset: 774111:20bc17754d8e
user:      riz <riz%NetBSD.org@localhost>
date:      Thu May 17 18:29:25 2012 +0000

description:
Pull up following revision(s) (requested by matt in ticket #253):
        sys/arch/powerpc/booke/copyin.c: revision 1.5
Make sure to have copyinstr return ENAMETOOLONG if the string was too long.

diffstat:

 sys/arch/powerpc/booke/copyin.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 9a4998d69108 -r 20bc17754d8e sys/arch/powerpc/booke/copyin.c
--- a/sys/arch/powerpc/booke/copyin.c   Thu May 17 18:26:55 2012 +0000
+++ b/sys/arch/powerpc/booke/copyin.c   Thu May 17 18:29:25 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: copyin.c,v 1.4 2011/06/20 05:20:37 matt Exp $  */
+/*     $NetBSD: copyin.c,v 1.4.8.1 2012/05/17 18:29:25 riz Exp $       */
 
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: copyin.c,v 1.4 2011/06/20 05:20:37 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: copyin.c,v 1.4.8.1 2012/05/17 18:29:25 riz Exp $");
 
 #include <sys/param.h>
 #include <sys/lwp.h>
@@ -314,5 +314,8 @@
        pcb->pcb_onfault = NULL;
        if (done)
                *done = copylen;
-       return 0;
+       /*
+        * If the last byte is not NUL (0), then the name is too long.
+        */
+       return (uint8_t)data ? ENAMETOOLONG : 0;
 }



Home | Main Index | Thread Index | Old Index