max filename length too short in error messages
authorceriel <none@none>
Wed, 31 Jan 1990 16:27:05 +0000 (16:27 +0000)
committerceriel <none@none>
Wed, 31 Jan 1990 16:27:05 +0000 (16:27 +0000)
mach/proto/as/comm2.y
mach/proto/as/comm4.c
mach/proto/as/comm6.c

index 3dd9675..30144a5 100644 (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'
index ee778af..18658b5 100644 (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;
index cb2a647..48ab4eb 100644 (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++;