rick@seismo.CSS.GOV (Rick Adams) (11/08/86)
Subject: Sloppy code doesn't run on a 68000 Index: usr.bin/uucp 4.3BSD Description: uucico and uuxqt don't run on a sun or anything else that doesn't let you dereference null pointers. The number of jobs to process at a batch should be bigger to ensure that grading works as intended. Repeat-By: run uucico on a sun Fix: Apply the following patch. diff -c -r uucp/conn.c nuucp/conn.c *** uucp/conn.c Fri Nov 7 18:24:39 1986 --- nuucp/conn.c Fri Oct 10 15:59:33 1986 *************** *** 419,424 **** --- 419,426 ---- AbortOn = NULL; for (k = F_LOGIN; k < nf; k += 2) { want = flds[k]; + if (want == NULL) + want = ""; ok = FAIL; while (ok != SUCCESS) { altern = index(want, '-'); diff -c -r uucp/uucp.h nuucp/uucp.h *** uucp/uucp.h Fri Nov 7 17:42:51 1986 --- nuucp/uucp.h Wed Oct 22 21:07:54 1986 *************** *** 249,255 **** #define SQTIME 60 #define TRYCALLS 2 /* number of tries to dial call */ ! #define LLEN 50 #define MAXRQST 250 #define DEBUG(l, f, s) if (Debug >= l) fprintf(stderr, f, s); else --- 249,255 ---- #define SQTIME 60 #define TRYCALLS 2 /* number of tries to dial call */ ! #define LLEN 150 #define MAXRQST 250 #define DEBUG(l, f, s) if (Debug >= l) fprintf(stderr, f, s); else diff -c -r uucp/versys.c nuucp/versys.c *** uucp/versys.c Sat Jan 11 15:08:54 1986 --- nuucp/versys.c Fri Oct 10 15:59:50 1986 *************** *** 32,38 **** DEBUG (11, "After Alias: %s\n", *nameptr); name = *nameptr; /* dereference */ ! if (strncmp(name, Myname, MAXBASENAME) == 0) return SUCCESS; fp = fopen(SYSFILE, "r"); --- 32,38 ---- DEBUG (11, "After Alias: %s\n", *nameptr); name = *nameptr; /* dereference */ ! if (name[0] == '\0' || strncmp(name, Myname, MAXBASENAME) == 0) return SUCCESS; fp = fopen(SYSFILE, "r"); *************** *** 44,50 **** getargs(line, targs, 100); if (strncmp(name, targs[0], MAXBASENAME) == SAME) { fclose(fp); ! strncpy(PhoneNumber, targs[F_PHONE], MAXPH); return SUCCESS; } } --- 44,51 ---- getargs(line, targs, 100); if (strncmp(name, targs[0], MAXBASENAME) == SAME) { fclose(fp); ! if (targs[F_PHONE]) ! strncpy(PhoneNumber, targs[F_PHONE], MAXPH); return SUCCESS; } } *** acucntrl.c.old Fri Nov 7 19:48:05 1986 --- acucntrl.c Fri Nov 7 19:48:02 1986 *************** *** 46,51 **** --- 46,52 ---- /* #define SENSECARRIER */ #include "uucp.h" + #ifdef DIALINOUT #include <sys/buf.h> #include <signal.h> #include <sys/conf.h> *************** *** 728,730 **** --- 729,732 ---- return (1); return (c == '\0'); } + #endif /* DIALINOUT */