Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264523
b: refs/heads/master
c: 7ee9585
h: refs/heads/master
i:
  264521: 3ab787d
  264519: 6a97866
v: v3
  • Loading branch information
James Morris committed Sep 9, 2011
1 parent 6b90376 commit 98249d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 32c3df631bc018109136a8f4f941ad591e76a0aa
refs/heads/master: 7ee95850bab6468f8213f36a84e872418d2faa00
12 changes: 6 additions & 6 deletions trunk/security/apparmor/policy_unpack.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,19 +381,19 @@ static bool unpack_trans_table(struct aa_ext *e, struct aa_profile *profile)
profile->file.trans.size = size;
for (i = 0; i < size; i++) {
char *str;
int c, j, size = unpack_strdup(e, &str, NULL);
int c, j, size2 = unpack_strdup(e, &str, NULL);
/* unpack_strdup verifies that the last character is
* null termination byte.
*/
if (!size)
if (!size2)
goto fail;
profile->file.trans.table[i] = str;
/* verify that name doesn't start with space */
if (isspace(*str))
goto fail;

/* count internal # of internal \0 */
for (c = j = 0; j < size - 2; j++) {
for (c = j = 0; j < size2 - 2; j++) {
if (!str[j])
c++;
}
Expand Down Expand Up @@ -440,11 +440,11 @@ static bool unpack_rlimits(struct aa_ext *e, struct aa_profile *profile)
if (size > RLIM_NLIMITS)
goto fail;
for (i = 0; i < size; i++) {
u64 tmp = 0;
u64 tmp2 = 0;
int a = aa_map_resource(i);
if (!unpack_u64(e, &tmp, NULL))
if (!unpack_u64(e, &tmp2, NULL))
goto fail;
profile->rlimits.limits[a].rlim_max = tmp;
profile->rlimits.limits[a].rlim_max = tmp2;
}
if (!unpack_nameX(e, AA_ARRAYEND, NULL))
goto fail;
Expand Down

0 comments on commit 98249d0

Please sign in to comment.