Date: Fri, 18 Sep 1998 22:07:33 +0200 (CEST) From: Joakim Henriksson <murduth@ludd.luth.se> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/7980: New ld buggy! Message-ID: <199809182007.WAA07980@rmstar.campus.luth.se>
next in thread | raw e-mail | index | archive | help
>Number: 7980 >Category: bin >Synopsis: ld has some serious memory bugs. >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Sep 18 13:10:00 PDT 1998 >Last-Modified: >Originator: Joakim Henriksson >Organization: University of Luleå >Release: FreeBSD 3.0-CURRENT i386 >Environment: uname -a FreeBSD rmstar.campus.luth.se 3.0-CURRENT FreeBSD 3.0-CURRENT #2: Fri Sep 18 16:31:39 CEST 1998 murduth@rmstar.campus.luth.se:/usr/src/sys/compile/RMSTAR i386 Current as of yesterday, ELF. >Description: Many arrays are assumed to be zero which breaks linking on lots of different things. >How-To-Repeat: ln -s AJ /etc/malloc.conf cat > breakld.c #include <stdio.h> #include <stlib.h> void main(void){ char *ptr; ptr = (char *) malloc(1024); gets(ptr); } ^D cc -c breakld.c ld -o breakld breakld.o -lc >Fix: bzero() all allocated memory or at least don't asume that allocated memory is zero'd, and add \000 where applicable. >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809182007.WAA07980>