[4914] in Athena Bugs
Saber msg: v2.1 (4/24/89 lycus vax Unix 4042 0)
daemon@ATHENA.MIT.EDU (jtkohl@ATHENA.MIT.EDU)
Fri May 11 12:13:53 1990
From: jtkohl@ATHENA.MIT.EDU
Date: Fri, 11 May 90 12:13:37 -0400
To: bugs@ATHENA.MIT.EDU
Cc: jtkohl@ATHENA.MIT.EDU
Saber mis-calculates string lengths and gives spurious warnings in some cases:
603 -> char copyto[10];
604 -> char copyfrom[4];
605 -> copyfrom = "hi!";
Error #267: Objects of type (char [4]) cannot be assigned.
606 -> strncpy(copyfrom, "hi!", 4);
(char *) 0x2d3110 "hi!"
607 -> copyfrom[3] = 'x';
(char) 'x'
608 -> copyfrom;
(char [4]) 0x2d3110 "hi!x" /* unterminated string */
609 -> strncpy(copyto, copyfrom, 4);
----------------
"workspace":609, Bad string/size args (Error #79)
strncpy(arg 2): String at address 0x2d3110 not terminated, and
size 4 too great (room for only 4 bytes).
(char *) 0x220e60 "hi!x"
610 ->