]> andersk Git - moira.git/commitdiff
fix off-by-one error in terminating "dept"
authordanw <danw>
Tue, 17 Nov 1998 21:19:15 +0000 (21:19 +0000)
committerdanw <danw>
Tue, 17 Nov 1998 21:19:15 +0000 (21:19 +0000)
regtape/employee.pc

index e989afcff13eddaddfb62a06cd13c5cc7a165ccf..129a699d293ae52d2b032ef72a413a341b8cf000 100644 (file)
@@ -488,7 +488,7 @@ void newuser(struct entry *e)
   *to = '\0';
   FixCase(e->dept);
   strncpy(dept, e->dept, USERS_DEPARTMENT_SIZE - 1);
-  dept[USERS_DEPARTMENT_SIZE] = '\0';
+  dept[USERS_DEPARTMENT_SIZE - 1] = '\0';
 
   id = set_next_users_id(0);
   uid = set_next_uid(e->highid);
This page took 0.079365 seconds and 5 git commands to generate.