Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!ames!lll-tis!elxsi!marduk!gww From: gww@marduk.UUCP (Gary Winiger) Newsgroups: comp.bugs.4bsd Subject: libF77 Usef never references first item in its list. +Fix Message-ID: <510@elxsi.UUCP> Date: Fri, 4-Sep-87 17:58:09 EDT Article-I.D.: elxsi.510 Posted: Fri Sep 4 17:58:09 1987 Date-Received: Sat, 5-Sep-87 20:53:00 EDT Sender: nobody@elxsi.UUCP Reply-To: gww@marduk.UUCP (Gary Winiger) Organization: ELXSI Super Computers, San Jose Lines: 64 Subject: Usef in libF77 never references the first item in its list. +Fix Index: usr.lib/libF77 4.3BSD +Fix Description: The program Usef used during construction of libF77 never references the first function in its list (besj0_) and thus returns " " rather than "-f". It also dereferences a null pointer. Repeat-By: Usef besj0_ Fix: The pointer index takes place at the wrong time. The attached code resolves this problem at Elxsi. Gary.. {ucbvax!sun,lll-lcc!lll-tis,amdahl!altos86,bridge2}!elxsi!gww --------- cut --------- snip --------- :.,$w diff ------------- *** /tmp/,RCSt1010765 Wed Dec 31 16:43:54 1986 --- Usef.c Wed Dec 31 16:42:25 1986 *************** *** 1,10 **** /* * $Log: Usef.c,v $ * Revision 1.1 86/12/31 16:05:29 gww * Initial revision * */ ! static char *ERcsId = "$Header: Usef.c,v 1.1 86/12/31 16:05:29 gww Exp $ ENIX BSD"; /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement --- 1,14 ---- /* * $Log: Usef.c,v $ + * Revision 1.2 86/12/31 16:41:58 gww + * Correct never referencing first item in name list and dereferencing + * null pointer. + * * Revision 1.1 86/12/31 16:05:29 gww * Initial revision * */ ! static char *ERcsId = "$Header: Usef.c,v 1.2 86/12/31 16:41:58 gww Exp $ ENIX BSD"; /* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement *************** *** 33,40 **** argv++; ptr = needs_f; while( *ptr != 0 ) { ! ptr++; ! if( strcmp( *ptr, *argv ) == 0 ) { printf("-f"); exit(0); --- 37,43 ---- argv++; ptr = needs_f; while( *ptr != 0 ) { ! if( strcmp( *ptr++, *argv ) == 0 ) { printf("-f"); exit(0);