]> andersk Git - moira.git/commitdiff
strncpy doesn't always NULL terminate. Fixes display bug in long lines
authordanw <danw>
Thu, 16 Jan 1997 01:26:51 +0000 (01:26 +0000)
committerdanw <danw>
Thu, 16 Jan 1997 01:26:51 +0000 (01:26 +0000)
on suns.

clients/moira/menu.c

index 6c0ae53fc23bd50f5487ded3723adb36e37b8573..d18884e3c749371dca82ba7a2ff18ec494d543e8 100644 (file)
@@ -679,6 +679,7 @@ char *msg;
     while(*s++) {
        if (s - line >= COLS-1) {
            (void) strncpy(copy, line, COLS-1);
+           copy[COLS-1] = '\0';
            line += COLS-1;
        } else if (*s == '\n') {
            *s = '\0';
This page took 2.186475 seconds and 5 git commands to generate.