1 |
jpp |
1.1 |
diff -up sudo-1.8.6p3/plugins/sudoers/sssd.c.emallocfail sudo-1.8.6p3/plugins/sudoers/sssd.c |
2 |
|
|
--- sudo-1.8.6p3/plugins/sudoers/sssd.c.emallocfail 2012-11-23 15:58:20.139417659 +0100 |
3 |
|
|
+++ sudo-1.8.6p3/plugins/sudoers/sssd.c 2012-11-23 15:58:26.732437421 +0100 |
4 |
|
|
@@ -212,7 +212,12 @@ sudo_sss_filter_result(struct sudo_sss_h |
5 |
|
|
sudo_debug_printf(SUDO_DEBUG_DEBUG, |
6 |
|
|
"reallocating result: %p (count: %u -> %u)", out_res->rules, |
7 |
|
|
in_res->num_rules, l); |
8 |
|
|
- out_res->rules = erealloc3(out_res->rules, l, sizeof(struct sss_sudo_rule)); |
9 |
|
|
+ if (l > 0) |
10 |
|
|
+ out_res->rules = erealloc3(out_res->rules, l, sizeof(struct sss_sudo_rule)); |
11 |
|
|
+ else { |
12 |
|
|
+ efree(out_res->rules); |
13 |
|
|
+ out_res->rules = NULL; |
14 |
|
|
+ } |
15 |
|
|
} |
16 |
|
|
|
17 |
|
|
out_res->num_rules = l; |