Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!munnari!mulga!jz From: jz@mulga.oz (Justin Zobel) Newsgroups: comp.sources.bugs Subject: vmail - bug and fix Message-ID: <2316@mulga.oz> Date: Sun, 18-Oct-87 19:50:09 EDT Article-I.D.: mulga.2316 Posted: Sun Oct 18 19:50:09 1987 Date-Received: Tue, 20-Oct-87 01:57:04 EDT Organization: Comp Sci, Melbourne Uni, Australia Lines: 27 Last week's posting of vmail contained a bug w.r.t a boundary condition in a loop. Following is a fix. (Those hardwired numbers shouldn't have been there at all ... they crept in while I was trying to understand the peculiar stack allocation on our Perkin-Elmer. Thanks to Steve Schlaifer and others who noticed this bug.) Diffs are: *** load.c.orig Fri Oct 16 11:09:58 1987 --- load.c Fri Oct 16 11:09:42 1987 *************** *** 226,232 **** } } if(s != (char *) NULL) { ! for(i=0 ; i < 50 && fgets(str, LEN, fp) != (char *) NULL ;) { str[strlen(str)-1] = ' '; strncpy(fill+i, str, 42-i); i += strlen(str); --- 226,232 ---- } } if(s != (char *) NULL) { ! for(i=0 ; i < 42 && fgets(str, LEN, fp) != (char *) NULL ;) { str[strlen(str)-1] = ' '; strncpy(fill+i, str, 42-i); i += strlen(str);