[apparmor] [patch] parser: fix uninitialized field in convert_aaregex_to_pcre() [resend]
Steve Beattie
steve at nxnw.org
Mon Jan 25 19:47:09 UTC 2016
This is an unchanged resend of the patch from this thread:
https://lists.ubuntu.com/archives/apparmor/2015-August/008494.html
The first entry in the grouping_count array is never initialized to 0;
subsequent depths are. This patch fixes the issue.
[parser-fix_uninitialized_grouping_value.patch]
Signed-off-by: Steve Beattie <steve at nxnw.org>
---
parser/parser_regex.c | 1 +
1 file changed, 1 insertion(+)
Index: b/parser/parser_regex.c
===================================================================
--- a/parser/parser_regex.c
+++ b/parser/parser_regex.c
@@ -122,6 +122,7 @@ pattern_t convert_aaregex_to_pcre(const
int ingrouping = 0; /* flag to indicate {} context */
int incharclass = 0; /* flag to indicate [ ] context */
int grouping_count[MAX_ALT_DEPTH];
+ grouping_count[ingrouping] = 0;
error = e_no_error;
ptype = ePatternBasic; /* assume no regex */
--
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20160125/697a0511/attachment.pgp>
More information about the AppArmor
mailing list