Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/powerpc fix pasto - don't limit OF_finddevi...



details:   https://anonhg.NetBSD.org/src/rev/36b5fcb45f0b
branches:  trunk
changeset: 461093:36b5fcb45f0b
user:      macallan <macallan%NetBSD.org@localhost>
date:      Sat Nov 16 00:16:55 2019 +0000

description:
fix pasto - don't limit OF_finddevice() to 32 characters
now this works again

diffstat:

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

diffs (27 lines):

diff -r a1e9985cb7e2 -r 36b5fcb45f0b sys/arch/powerpc/powerpc/openfirm.c
--- a/sys/arch/powerpc/powerpc/openfirm.c       Fri Nov 15 23:43:12 2019 +0000
+++ b/sys/arch/powerpc/powerpc/openfirm.c       Sat Nov 16 00:16:55 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: openfirm.c,v 1.28 2019/11/15 23:41:47 macallan Exp $   */
+/*     $NetBSD: openfirm.c,v 1.29 2019/11/16 00:16:55 macallan Exp $   */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -34,7 +34,7 @@
 #include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: openfirm.c,v 1.28 2019/11/15 23:41:47 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: openfirm.c,v 1.29 2019/11/16 00:16:55 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -278,7 +278,7 @@
        };
 
        ofw_stack();
-       strncpy(OF_buf, name, 32);
+       strncpy(OF_buf, name, NBPG);
        args.device = OF_buf;
        if (openfirmware(&args) == -1)
                return -1;



Home | Main Index | Thread Index | Old Index