Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.6.2.14 $; site ciprico.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!stolaf!umn-cs!mmm!ciprico!dan From: dan@ciprico.UUCP Newsgroups: net.notes Subject: newsinput.c problem for long names. Message-ID: <18300002@ciprico.UUCP> Date: Wed, 6-Feb-85 17:20:00 EST Article-I.D.: ciprico.18300002 Posted: Wed Feb 6 17:20:00 1985 Date-Received: Wed, 13-Feb-85 03:43:47 EST Lines: 61 Nf-ID: #N:ciprico:18300002: 0:1555 Nf-From: ciprico!dan Feb 6 16:20:00 1985 There is another problem with newsinput.c....When receiving an article from a path: xx!yy!uu!user The author's system & name are put into the correct arrays, but the loops have the wrong termination variables. The system name terminates when it overflows NAMESZ & the author names terminates when it overflows SYSSZ. What I did was to simply change the code, thus: -------------------Start of Code----------- /* * TEMPORARY KLUDGE... * throw out domain part until host * name length increased */ if ((c = line[j + i]) == '\0' || c == '.') break; origsys[i] = c; } origsys[i] = '\0'; } else { /* host!user */ int delim = j; line[delim] = '\0'; /* drop uucp route */ for (i = delim - 1; i > 0; i--) { if (line[i] == '!' || line[i] == ':') { i++; break; } } j = i; /* copy host */ + for (i = 0; i < (SYSSZ - 1); i++) { if ((c = line[j + i]) == '\0') break; origsys[i] = c; } origsys[i] = '\0'; j = delim + 1; /* copy user */ + for (i = 0; i < (NAMESZ - 1); i++) { if ((c = line[j + i]) == '\0') break; authname[i] = c; } authname[i] = '\0'; } /* * get fromsys, which is the first host in path */ if (p = index (line, '!')) { *p = '\0'; strncpy (fromsys, line, SYSSZ - 1); } else strcpy (fromsys, origsys); } -----------End of change, also the EOF of newsinput.c--------- Note: the + lines are the only ones that actually changed. -Dan A. Dickey