[10971] in Athena Bugs

home help back first fref pref prev next nref lref last post

Re: Ascii netprob core dump

daemon@ATHENA.MIT.EDU (epeisach@MIT.EDU)
Mon Sep 13 13:08:23 1993

From: epeisach@MIT.EDU
Date: Mon, 13 Sep 93 13:08:04 -0400
To: bugs@MIT.EDU
Cc: brlewis@MIT.EDU



I think the bug is related to this change that was introduced on the
10th... 

The strncpy may not be NULL terminated which probbaly caused the
problems later....


*** /tmp/,RCSt1a09681	Mon Sep 13 13:05:45 1993
--- rules_clnt.c	Fri Sep 10 17:38:37 1993
***************
*** 39,45 ****
    if (strcmp(arg1, "From") == 0)
      (void) sscanf(t_ptr->from, "From %s", str1);
    if (strcmp(arg1, "Subject") == 0)
!     (void) sprintf(str1, "%s", t_ptr->subject);
    if (strcmp(arg1, "Day") == 0)
      (void) sscanf(t_ptr->from, "From %*s %s", str1);
    if (strcmp(arg1, "Month") == 0)
--- 39,45 ----
    if (strcmp(arg1, "From") == 0)
      (void) sscanf(t_ptr->from, "From %s", str1);
    if (strcmp(arg1, "Subject") == 0)
!     (void) strncpy(str1, t_ptr->subject, LINE_LENGTH-1);
    if (strcmp(arg1, "Day") == 0)
      (void) sscanf(t_ptr->from, "From %*s %s", str1);
    if (strcmp(arg1, "Month") == 0)

home help back first fref pref prev next nref lref last post