Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jun 2002 07:07:39 -0700 (PDT)
From:      Brian Feldman <green@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 13476 for review
Message-ID:  <200206271407.g5RE7djG050223@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=13476

Change 13476 by green@green_laptop_2 on 2002/06/27 07:07:14

	Don't crash if an ELF module is b0rked and has a 0 where it
	shouldn't.  Maybe I should just let it crash?

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/kern/link_elf.c#5 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/kern/link_elf.c#5 (text+ko) ====

@@ -311,6 +311,8 @@
 	    const Elf_Hashelt *hashtab = (const Elf_Hashelt *)
 		(ef->address + dp->d_un.d_ptr);
 	    ef->nbuckets = hashtab[0];
+	    if (ef->nbuckets == 0)
+		return ENOEXEC;
 	    ef->nchains = hashtab[1];
 	    ef->buckets = hashtab + 2;
 	    ef->chains = ef->buckets + ef->nbuckets;

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206271407.g5RE7djG050223>