Walter Doekes
028554faab
astfd: Fix buffer overflow in DEBUG_FD_LEAKS.
...
If DEBUG_FD_LEAKS was used and more file descriptors than the default of
1024 were available, some DEBUG_FD_LEAKS-patched functions would
overwrite memory past the fixed-size (1024) fdleaks buffer.
This change:
- adds bounds checks to __ast_fdleak_fopen and __ast_fdleak_pipe
- consistently uses ARRAY_LEN() instead of sizeof() or 1023 or 1024
- stores pointers to constants instead of copying the contents
- reorders the fdleaks struct for possibly tighter packing
- adds a tiny bit of documentation
ASTERISK-25212 #close
Change-Id: Iacb69e7701c0f0a113786bd946cea5b6335a85e5
2015-07-02 12:22:55 +02:00
..
2015-04-12 13:59:44 -05:00
2015-03-30 02:28:47 +00:00
2015-04-12 13:49:40 -05:00
2014-11-02 07:35:36 +00:00
2014-11-20 16:35:18 +00:00
2014-05-09 22:28:40 +00:00
2012-06-15 16:20:16 +00:00
2015-03-26 22:16:31 +00:00
2014-11-02 08:03:18 +00:00
2012-07-11 17:16:50 +00:00
2012-04-17 18:57:40 +00:00
2012-07-11 17:16:50 +00:00
2012-03-24 02:42:42 +00:00
2012-07-11 17:16:50 +00:00
2015-05-12 10:34:01 -04:00
2013-08-22 08:22:39 +00:00
2015-07-02 12:22:55 +02:00
2015-03-26 22:16:31 +00:00
2015-05-25 10:12:59 +03:00
2015-05-20 16:07:51 -05:00
2012-06-15 16:20:16 +00:00
2014-06-09 03:47:11 +00:00
2014-11-20 14:20:08 +00:00
2014-10-10 12:55:56 +00:00
2015-04-06 18:58:30 +00:00
2013-08-06 08:19:42 +00:00
2015-04-09 12:47:09 +00:00
2015-04-21 16:17:33 -04:00
2015-04-10 16:25:13 +00:00
2012-06-15 16:20:16 +00:00
2015-06-04 20:07:26 +02:00
2014-05-09 22:28:40 +00:00
2015-03-26 22:16:31 +00:00
2012-03-22 19:51:16 +00:00
2015-03-26 22:16:31 +00:00
2012-06-15 16:20:16 +00:00
2014-06-16 09:00:18 +00:00
2014-05-09 22:28:40 +00:00
2013-02-05 18:10:46 +00:00
2012-06-15 16:20:16 +00:00
2015-03-26 22:16:31 +00:00
2015-04-06 18:58:30 +00:00
2012-03-22 19:51:16 +00:00
2015-04-09 12:47:09 +00:00
2015-04-23 11:54:09 -05:00
2015-06-08 11:23:38 -04:00
2015-03-26 22:16:31 +00:00
2012-06-15 16:20:16 +00:00
2012-03-22 19:51:16 +00:00
2012-06-15 16:20:16 +00:00
2013-03-27 19:51:29 +00:00
2015-03-26 22:16:31 +00:00
2015-03-14 02:27:13 +00:00
2015-04-06 17:51:59 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2013-09-10 17:56:56 +00:00
2015-03-26 22:16:31 +00:00
2015-03-26 22:16:31 +00:00
2015-04-09 12:47:09 +00:00
2014-05-09 22:28:40 +00:00
2015-03-30 02:44:21 +00:00
2015-05-08 08:34:44 -05:00
2012-01-30 21:21:16 +00:00
2015-02-21 02:55:26 +00:00
2014-12-12 23:31:38 +00:00
2015-05-20 21:53:46 -04:00
2015-03-30 11:40:33 +00:00
2015-05-13 10:46:13 -05:00
2012-04-28 01:33:49 +00:00
2015-05-14 11:24:17 -05:00
2015-03-26 22:16:31 +00:00
2015-03-17 21:43:32 +00:00
2014-12-17 09:24:50 +00:00
2015-06-26 20:38:58 -05:00
2012-06-15 16:20:16 +00:00
2010-09-07 19:09:08 +00:00
2015-04-09 12:47:09 +00:00
2012-06-15 16:20:16 +00:00
2015-04-29 16:36:24 -05:00
2014-03-26 22:44:11 +00:00
2015-02-19 01:59:05 +00:00
2015-04-23 11:54:09 -05:00
2012-03-22 19:51:16 +00:00
2012-10-11 15:31:10 +00:00
2014-05-09 22:28:40 +00:00
2012-06-15 16:20:16 +00:00
2013-01-19 20:49:43 +00:00
2015-03-27 07:06:24 +00:00
2015-03-26 22:16:31 +00:00
2015-01-12 18:00:24 +00:00
2015-03-26 22:16:31 +00:00
2015-05-08 08:34:44 -05:00
2012-06-15 16:20:16 +00:00
2012-06-15 16:20:16 +00:00
2015-03-26 22:16:31 +00:00
2015-03-26 22:16:31 +00:00
2015-03-26 22:16:31 +00:00
2015-04-10 16:25:13 +00:00
2015-04-09 12:47:09 +00:00
2012-06-15 16:20:16 +00:00
2015-03-26 22:16:31 +00:00
2012-06-15 16:20:16 +00:00
2015-03-26 22:16:31 +00:00