gww@marduk.UUCP (Gary Winiger) (09/05/87)
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);