summaryrefslogtreecommitdiff
blob: 10c0f9a138414c0e175f85a9714389163c3b5e0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 7cb0e09ded7c5c0138fb5e4621f0ce54df1f381e Mon Sep 17 00:00:00 2001
From: "J. Bruce Fields" <bfields@citi.umich.edu>
Date: Wed, 15 Aug 2007 16:43:26 -0400
Subject: [PATCH 16/17] fix nfs4->posix mapping state allocation

Fix allocation of a couple arrays used in the nfs4->posix mapping;
without this we could get heap corruption when translating acls with
more than a few users or groups.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
---
 libacl/acl_n4tp_acl_trans.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libacl/acl_n4tp_acl_trans.c b/libacl/acl_n4tp_acl_trans.c
index 7708248..52972c7 100644
--- a/libacl/acl_n4tp_acl_trans.c
+++ b/libacl/acl_n4tp_acl_trans.c
@@ -83,7 +83,7 @@ init_state(struct posix_acl_state *state, int cnt)
 	 * enough space for either:
 	 */
 	alloc = sizeof(struct posix_ace_state_array)
-		+ cnt*sizeof(struct posix_ace_state);
+		+ cnt*sizeof(struct posix_user_ace_state);
 	state->users = calloc(1, alloc);
 	if (!state->users)
 		return -ENOMEM;
-- 
1.7.8.1