]> git.pld-linux.org Git - packages/kernel.git/blob - 0002-apparmor-Fix-shadowed-local-variable-in-unpack_trans.patch
- drop obsolete files
[packages/kernel.git] / 0002-apparmor-Fix-shadowed-local-variable-in-unpack_trans.patch
1 From c6cad5e65a23dcafa1821ca381901297664d9c64 Mon Sep 17 00:00:00 2001
2 From: Geert Uytterhoeven <geert@linux-m68k.org>
3 Date: Thu, 6 Jul 2017 10:56:21 +0200
4 Subject: [PATCH 02/17] apparmor: Fix shadowed local variable in
5  unpack_trans_table()
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 with W=2:
11
12     security/apparmor/policy_unpack.c: In function ‘unpack_trans_table’:
13     security/apparmor/policy_unpack.c:469: warning: declaration of ‘pos’ shadows a previous local
14     security/apparmor/policy_unpack.c:451: warning: shadowed declaration is here
15
16 Rename the old "pos" to "saved_pos" to fix this.
17
18 Fixes: 5379a3312024a8be ("apparmor: support v7 transition format compatible with label_parse")
19 Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
20 Reviewed-by: Serge Hallyn <serge@hallyn.com>
21 Signed-off-by: John Johansen <john.johansen@canonical.com>
22 (cherry picked from commit 966d631935a578fadb5770f17a957ee1a969d868)
23 ---
24  security/apparmor/policy_unpack.c | 4 ++--
25  1 file changed, 2 insertions(+), 2 deletions(-)
26
27 diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c
28 index c600f4dd1783..2d5a1a007b06 100644
29 --- a/security/apparmor/policy_unpack.c
30 +++ b/security/apparmor/policy_unpack.c
31 @@ -448,7 +448,7 @@ static struct aa_dfa *unpack_dfa(struct aa_ext *e)
32   */
33  static bool unpack_trans_table(struct aa_ext *e, struct aa_profile *profile)
34  {
35 -       void *pos = e->pos;
36 +       void *saved_pos = e->pos;
37  
38         /* exec table is optional */
39         if (unpack_nameX(e, AA_STRUCT, "xtable")) {
40 @@ -511,7 +511,7 @@ static bool unpack_trans_table(struct aa_ext *e, struct aa_profile *profile)
41  
42  fail:
43         aa_free_domain_entries(&profile->file.trans);
44 -       e->pos = pos;
45 +       e->pos = saved_pos;
46         return 0;
47  }
48  
49 -- 
50 2.11.0
51
This page took 0.026641 seconds and 3 git commands to generate.