[Cvs-nserver-commits] CVS: cvs-nserver/acl dir-acl.c,1.1.2.16,1.1.2.17
Brought to you by:
tyranny
From: Alexey M. <ty...@us...> - 2002-04-20 15:26:54
|
Update of /cvsroot/cvs-nserver/cvs-nserver/acl In directory usw-pr-cvs1:/tmp/cvs-serv27950 Modified Files: Tag: NCLI-1-11-1 dir-acl.c Log Message: Fix horrible memory allocation bug Index: dir-acl.c =================================================================== RCS file: /cvsroot/cvs-nserver/cvs-nserver/acl/Attic/dir-acl.c,v retrieving revision 1.1.2.16 retrieving revision 1.1.2.17 diff -u -d -r1.1.2.16 -r1.1.2.17 --- dir-acl.c 31 Mar 2002 20:31:52 -0000 1.1.2.16 +++ dir-acl.c 20 Apr 2002 15:26:50 -0000 1.1.2.17 @@ -102,7 +102,7 @@ /* reallocate if needed */ if (dirs_count + 1 >= dirs_allocated) { struct DIR_ACL **new_top_dirs = - realloc(top_dirs, dirs_allocated + ALLOC_DELTA); + realloc(top_dirs, (dirs_allocated + ALLOC_DELTA) * sizeof(struct DIR_ACL*)); if (new_top_dirs == NULL) return 0; |