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;}
| program '#' NUMBER STRING '\n'
{ lineno = $3;
if (modulename) strncpy(modulename, &stringbuf[1], 63);
if (modulename) strncpy(modulename, &stringbuf[1], STRINGMAX-1);
LISTLINE(1); RELODONE;
}
| program error '\n'

View file

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

View file

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