[15504] in Athena Bugs

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

fix for buffer overflow in olcd

daemon@ATHENA.MIT.EDU (mhpower@MIT.EDU)
Mon Sep 15 02:13:03 1997

From: <mhpower@MIT.EDU>
To: bugs@MIT.EDU, sipb-athena-bugs@MIT.EDU
Date: Mon, 15 Sep 1997 02:13:00 EDT

The patch is relative to /mit/source/athena/bin/olc/server/olcd/olcd.c

Matt

*** olcd.c.old	Thu Sep 19 22:56:06 1996
--- olcd.c	Mon Sep 15 02:03:36 1997
***************
*** 337,339 ****
      }
!     (void) strcpy(hostname, this_host_entry->h_name);
  
--- 337,340 ----
      }
!     (void) strncpy(hostname, this_host_entry->h_name, sizeof(hostname));
!     hostname[sizeof(hostname) - 1] = '\0';
  

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