chiark / gitweb /
eglibc (2.11.3-4+deb6u3) squeeze-lts; urgency=medium
[eglibc.git] / debian / patches / any / submitted-nis-netgrp.diff
1 This assertion breaks applications if they redefine malloc/free functions,
2 malloc_usable_size may then report wrong values.  This is true for instance
3 with bash, whereas bash-static works fine because it does not use its own
4 wrapper functions.  See #322011 and merged bugs.
5
6 # DP: Dpatch author: Denis Barbier
7 # DP: Patch author: Denis Barbier
8 # DP: Upstream status: BZ692
9 # DP: Date: 2006-01-12
10
11
12 ---
13  nis/nss_nis/nis-netgrp.c |    5 ++++-
14  1 file changed, 4 insertions(+), 1 deletion(-)
15
16 --- a/nis/nss_nis/nis-netgrp.c
17 +++ b/nis/nss_nis/nis-netgrp.c
18 @@ -72,7 +72,10 @@
19          and the last byte is filled with NUL.  So we can simply
20          use that buffer.  */
21        assert (len >= 0);
22 -      assert (malloc_usable_size (netgrp->data) >= len + 1);
23 +      /* Call to malloc_usable_size disabled, this breaks if applications
24 +         redefine malloc/free with a different implementation.
25 +         This assert is always true, see yp_match.  */
26 +      /* assert (malloc_usable_size (netgrp->data) >= len + 1); */
27        assert (netgrp->data[len] == '\0');
28  
29        netgrp->data_size = len;