Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/ddb pullup 1.25->1.26 (thorpej): Don't load the sym...



details:   https://anonhg.NetBSD.org/src/rev/b4c383fc0d4a
branches:  netbsd-1-4
changeset: 468722:b4c383fc0d4a
user:      perry <perry%NetBSD.org@localhost>
date:      Fri Jun 18 17:18:43 1999 +0000

description:
pullup 1.25->1.26 (thorpej): Don't load the symbol table if it's corrupted

diffstat:

 sys/ddb/db_aout.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 40d4584a9f07 -r b4c383fc0d4a sys/ddb/db_aout.c
--- a/sys/ddb/db_aout.c Fri Jun 18 17:17:04 1999 +0000
+++ b/sys/ddb/db_aout.c Fri Jun 18 17:18:43 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_aout.c,v 1.21.4.2 1999/04/12 21:27:07 pk Exp $      */
+/*     $NetBSD: db_aout.c,v 1.21.4.3 1999/06/18 17:18:43 perry Exp $   */
 
 /* 
  * Mach Operating System
@@ -90,7 +90,7 @@
        register struct nlist   *sym_start, *sym_end;
        register struct nlist   *sp;
        register char *strtab;
-       register int slen;
+       register int slen, bad = 0;
        char *estrtab;
 
        if (ALIGNED_POINTER(vsymtab, long) == 0) {
@@ -128,12 +128,16 @@
                    printf("[ %s has bad a.out string table index (0x%x) ]\n",
                        name, strx);
                    sp->n_un.n_name = 0;
+                   bad = 1;
                    continue;
                }
                sp->n_un.n_name = strtab + strx;
            }
        }
 
+       if (bad)
+               return (FALSE);
+
        if (db_add_symbol_table((char *)sym_start, (char *)sym_end, name,
            NULL) !=  -1) {
                 printf("[ preserving %d bytes of %s a.out symbol table ]\n",



Home | Main Index | Thread Index | Old Index