From: ceriel Date: Wed, 31 Jan 1990 16:27:05 +0000 (+0000) Subject: max filename length too short in error messages X-Git-Tag: release-5-5~1844 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=0c5cce9a96f713a826438b17c3ce304824439683;p=ack.git max filename length too short in error messages --- diff --git a/mach/proto/as/comm2.y b/mach/proto/as/comm2.y index 3dd9675b1..30144a59c 100644 --- a/mach/proto/as/comm2.y +++ b/mach/proto/as/comm2.y @@ -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' diff --git a/mach/proto/as/comm4.c b/mach/proto/as/comm4.c index ee778af77..18658b5fe 100644 --- a/mach/proto/as/comm4.c +++ b/mach/proto/as/comm4.c @@ -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; diff --git a/mach/proto/as/comm6.c b/mach/proto/as/comm6.c index cb2a647f1..48ab4eb10 100644 --- a/mach/proto/as/comm6.c +++ b/mach/proto/as/comm6.c @@ -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++;