aboutsummaryrefslogtreecommitdiffstats
path: root/security/apparmor/policy_unpack.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/apparmor/policy_unpack.c')
-rw-r--r--security/apparmor/policy_unpack.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c
index d6d9a57b5652..741dd13e089b 100644
--- a/security/apparmor/policy_unpack.c
+++ b/security/apparmor/policy_unpack.c
@@ -381,11 +381,11 @@ static bool unpack_trans_table(struct aa_ext *e, struct aa_profile *profile)
381 profile->file.trans.size = size; 381 profile->file.trans.size = size;
382 for (i = 0; i < size; i++) { 382 for (i = 0; i < size; i++) {
383 char *str; 383 char *str;
384 int c, j, size = unpack_strdup(e, &str, NULL); 384 int c, j, size2 = unpack_strdup(e, &str, NULL);
385 /* unpack_strdup verifies that the last character is 385 /* unpack_strdup verifies that the last character is
386 * null termination byte. 386 * null termination byte.
387 */ 387 */
388 if (!size) 388 if (!size2)
389 goto fail; 389 goto fail;
390 profile->file.trans.table[i] = str; 390 profile->file.trans.table[i] = str;
391 /* verify that name doesn't start with space */ 391 /* verify that name doesn't start with space */
@@ -393,7 +393,7 @@ static bool unpack_trans_table(struct aa_ext *e, struct aa_profile *profile)
393 goto fail; 393 goto fail;
394 394
395 /* count internal # of internal \0 */ 395 /* count internal # of internal \0 */
396 for (c = j = 0; j < size - 2; j++) { 396 for (c = j = 0; j < size2 - 2; j++) {
397 if (!str[j]) 397 if (!str[j])
398 c++; 398 c++;
399 } 399 }
@@ -440,11 +440,11 @@ static bool unpack_rlimits(struct aa_ext *e, struct aa_profile *profile)
440 if (size > RLIM_NLIMITS) 440 if (size > RLIM_NLIMITS)
441 goto fail; 441 goto fail;
442 for (i = 0; i < size; i++) { 442 for (i = 0; i < size; i++) {
443 u64 tmp = 0; 443 u64 tmp2 = 0;
444 int a = aa_map_resource(i); 444 int a = aa_map_resource(i);
445 if (!unpack_u64(e, &tmp, NULL)) 445 if (!unpack_u64(e, &tmp2, NULL))
446 goto fail; 446 goto fail;
447 profile->rlimits.limits[a].rlim_max = tmp; 447 profile->rlimits.limits[a].rlim_max = tmp2;
448 } 448 }
449 if (!unpack_nameX(e, AA_ARRAYEND, NULL)) 449 if (!unpack_nameX(e, AA_ARRAYEND, NULL))
450 goto fail; 450 goto fail;