max filename length too short in error messages

This commit is contained in:
ceriel 1990-01-31 16:27:05 +00:00
parent 546d8f3d16
commit 0c5cce9a96
3 changed files with 8 additions and 4 deletions

View file

@ -125,7 +125,7 @@ program : /* empty */
{ lineno++; LISTLINE(1); RELODONE;} { lineno++; LISTLINE(1); RELODONE;}
| program '#' NUMBER STRING '\n' | program '#' NUMBER STRING '\n'
{ lineno = $3; { lineno = $3;
if (modulename) strncpy(modulename, &stringbuf[1], 63); if (modulename) strncpy(modulename, &stringbuf[1], STRINGMAX-1);
LISTLINE(1); RELODONE; LISTLINE(1); RELODONE;
} }
| program error '\n' | program error '\n'

View file

@ -433,11 +433,11 @@ pass_23(n)
newmodule(s) newmodule(s)
char *s; char *s;
{ {
static char nmbuf[64]; static char nmbuf[STRINGMAX];
switchsect(S_UND); switchsect(S_UND);
if (s && s != modulename) { if (s && s != modulename) {
strncpy(nmbuf, s, 63); strncpy(nmbuf, s, STRINGMAX-1);
modulename = nmbuf; modulename = nmbuf;
} }
else modulename = s; else modulename = s;

View file

@ -270,7 +270,11 @@ short s;
s &= ~S_COM; s &= ~S_COM;
if ((n & RELPC) == 0 && s == S_ABS) if ((n & RELPC) == 0 && s == S_ABS)
return; return;
if ((n & RELPC) != 0 && s == DOTTYP) if ((n & RELPC) != 0 && s == DOTTYP
#ifndef ASLD
&& ! iscomm
#endif
)
return; return;
if (pass != PASS_3) { if (pass != PASS_3) {
outhead.oh_nrelo++; outhead.oh_nrelo++;