Source-Changes-HG archive

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

[src/trunk]: src/sys/lib/libsa Don't try to load a.out header if there is no ...



details:   https://anonhg.NetBSD.org/src/rev/af791c367417
branches:  trunk
changeset: 499978:af791c367417
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Dec 03 02:53:04 2000 +0000

description:
Don't try to load a.out header if there is no space for it before text.

diffstat:

 sys/lib/libsa/loadfile.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 90afd2414b48 -r af791c367417 sys/lib/libsa/loadfile.c
--- a/sys/lib/libsa/loadfile.c  Sun Dec 03 02:43:18 2000 +0000
+++ b/sys/lib/libsa/loadfile.c  Sun Dec 03 02:53:04 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: loadfile.c,v 1.9 2000/11/11 09:25:12 tsutsui Exp $ */
+/* $NetBSD: loadfile.c,v 1.10 2000/12/03 02:53:04 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -473,7 +473,7 @@
         * symbols were loaded by this boot program.
         */
        if (magic == OMAGIC || magic == NMAGIC) {
-               if (flags & LOAD_HDR)
+               if (flags & LOAD_HDR && maxp >= sizeof(*x))
                        BCOPY(x, maxp - sizeof(*x), sizeof(*x));
        }
        else {



Home | Main Index | Thread Index | Old Index