Takashi Yano
5ac83ea47a
newlib: Fix memory leak regarding gdtoa-based _ldtoa_r().
...
After the commit a4705d387f78, printf() for floating-point values
causes a memory leak. The legacy _ldtoa_r() assumed the char pointer
returned will be free'ed by Bfree(). However, gdtoa-based _ldtoa_r()
returns the pointer returned by gdtoa() which should be free'ed by
freedtoa(). Due to this issue, the caller of _ldtoa_r() fails to free
the allocated char buffer. This is the cause of the said memory leak.
https://cygwin.com/pipermail/cygwin/2023-July/254054.html
This patch makes rv_alloc()/freedtoa() allocate/free the buffer in
a compatible way with legacy _ldtoa_r().
Fixes: a4705d387f78 ("ldtoa: Import gdtoa from OpenBSD.")
Reported-by: natan_b <natan_b@libero.it>
Reviewed-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
2023-08-02 15:00:56 +09:00
..
2022-07-13 06:55:41 +02:00
2022-05-18 07:45:09 +02:00
2022-05-18 07:45:09 +02:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2022-09-19 15:35:55 -04:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:20 -06:00
2018-01-17 11:47:26 -06:00
2021-02-18 02:05:47 +01:00
2022-09-10 20:58:01 +02:00
2022-09-10 21:00:38 +02:00
2017-02-13 17:04:17 -05:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:27 -06:00
2018-01-17 11:47:16 -06:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2020-01-29 19:03:31 +01:00
2016-08-15 10:56:57 +02:00
2018-01-17 11:47:26 -06:00
2022-03-09 16:58:46 -05:00
2022-03-09 16:58:46 -05:00
2022-09-10 20:58:03 +02:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2020-01-29 19:03:31 +01:00
2018-01-17 11:47:26 -06:00
2022-07-13 06:55:46 +02:00
2018-01-17 11:47:26 -06:00
2022-07-13 06:55:46 +02:00
2019-07-24 11:58:21 +02:00
2002-12-20 21:07:56 +00:00
2017-12-01 03:41:52 -06:00
2018-01-17 11:47:26 -06:00
2022-05-13 12:35:00 +02:00
2022-03-09 16:58:46 -05:00
2023-08-02 15:00:56 +09:00
2021-12-03 19:20:17 +09:00
2021-08-23 10:02:00 +02:00
2021-12-03 19:20:17 +09:00
2018-01-17 11:47:26 -06:00
2023-08-02 15:00:56 +09:00
2021-12-03 19:20:17 +09:00
2021-12-03 19:20:17 +09:00
2020-01-29 19:03:31 +01:00
2020-01-29 19:03:31 +01:00
2018-06-18 18:45:44 +02:00
2020-01-29 19:03:31 +01:00
2020-01-29 19:03:31 +01:00
2017-07-28 12:23:08 +02:00
2017-07-28 12:23:10 +02:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2022-07-13 06:55:46 +02:00
2018-01-17 11:47:26 -06:00
2022-07-13 06:55:46 +02:00
2020-01-29 19:03:31 +01:00
2021-12-03 19:20:17 +09:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2023-03-16 18:25:09 +01:00
2018-01-17 11:47:26 -06:00
2022-03-16 21:18:25 -04:00
2018-01-17 11:47:26 -06:00
2022-03-09 16:58:46 -05:00
2022-03-09 16:58:46 -05:00
2018-01-17 11:47:26 -06:00
2022-03-09 16:58:46 -05:00
2022-03-09 16:58:46 -05:00
2022-03-09 16:58:46 -05:00
2018-01-17 11:47:29 -06:00
2018-01-17 11:47:26 -06:00
2022-07-13 06:55:46 +02:00
2022-07-13 06:55:46 +02:00
2022-07-13 06:55:46 +02:00
2003-12-05 06:13:44 +00:00
2022-07-13 06:55:46 +02:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2023-07-31 22:39:09 +02:00
2022-07-13 06:55:46 +02:00
2017-12-01 03:41:52 -06:00
2022-07-13 06:55:46 +02:00
2021-12-03 19:20:17 +09:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2022-03-09 16:58:46 -05:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2023-02-27 10:54:26 +01:00
2018-01-17 11:47:26 -06:00
2015-12-21 11:49:28 -05:00
2015-12-21 11:49:28 -05:00
2018-01-17 11:47:27 -06:00
2020-01-29 19:03:31 +01:00
2020-01-29 19:03:31 +01:00
2022-03-09 16:58:46 -05:00
2017-02-13 17:04:17 -05:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:29 -06:00
2018-01-17 11:47:26 -06:00
2022-07-13 06:55:46 +02:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2020-08-12 10:09:56 +02:00
2018-01-17 11:47:26 -06:00
2022-03-09 16:58:46 -05:00
2018-01-17 11:47:26 -06:00
2023-02-24 16:40:58 +01:00
2018-01-17 11:47:26 -06:00
2020-01-29 19:03:31 +01:00
2020-01-29 19:03:31 +01:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:30 -06:00
2016-03-28 22:39:50 -05:00
2022-07-13 06:55:41 +02:00
2020-01-09 15:18:14 -05:00
2022-07-13 06:55:41 +02:00
2022-07-13 06:55:41 +02:00
2016-08-15 17:35:21 +02:00
2016-08-15 17:35:21 +02:00
2022-07-13 06:55:41 +02:00
2018-10-10 17:53:55 +02:00
2022-07-13 06:55:41 +02:00
2016-08-15 17:35:21 +02:00
2022-07-13 06:55:41 +02:00
2022-07-13 06:55:41 +02:00
2018-01-17 11:47:29 -06:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2022-03-09 16:58:46 -05:00
2022-07-13 06:55:46 +02:00
2022-07-13 06:55:46 +02:00
2018-01-17 11:47:26 -06:00
2022-07-13 06:55:41 +02:00
2022-07-13 06:55:41 +02:00
2022-07-13 06:55:41 +02:00
2018-09-06 14:14:05 +02:00
2016-08-15 17:35:21 +02:00
2022-07-13 06:55:41 +02:00
2018-01-17 11:47:26 -06:00
2018-01-17 11:47:26 -06:00
2022-07-13 06:55:41 +02:00
2016-08-15 17:35:21 +02:00
2022-07-13 06:55:41 +02:00
2022-07-13 06:55:41 +02:00
2016-08-15 10:56:57 +02:00
2023-07-31 22:39:09 +02:00
2022-07-13 06:55:46 +02:00