File opie-2.4-nul-overflow.patch of Package opie

permsfile.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: opie-2.4/permsfile.c
===================================================================
--- opie-2.4.orig/permsfile.c
+++ opie-2.4/permsfile.c
@@ -158,7 +158,7 @@ VOIDRET permsfile FUNCTION((name, ttyn, 
       return;
     if (fgets(buf, BUFSIZE, fh) == NULL)
       return;
-    buf[BUFSIZE] = 0;
+    buf[BUFSIZE-1] = 0;
 
     doaline(buf, name, ttyn, uid, gid);
   }