John Baldwin d131218534 h_resolv: Fix a buffer overflow in load().
fgetln() returns a pointer to an array of characters that is 'len'
characters long, not 'len + 1'.  While here, overwriting the contents
of the buffer returned by fgetln isn't really safe, so switch to using
getline() instead.

Note that these fixes are a subset of those applied to a
near-identical copy of this function in libc's resolv_test.c in commit
2afeaad315ac19450389b8f2befdbe7c91c37818.

Reviewed by:	ngie
Reported by:	CHERI (buffer overflow)
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D37886
2022-12-28 09:39:18 -08:00
..
2022-04-18 14:52:30 -07:00
2022-10-13 08:47:56 -04:00
2022-07-27 09:00:30 -07:00
2022-01-18 08:10:33 -08:00
2021-12-06 16:36:44 -05:00
2022-11-17 22:15:00 -08:00
2022-09-05 22:52:39 -07:00
2021-12-06 16:36:44 -05:00
2022-12-21 17:13:42 -08:00
2021-11-06 16:24:36 -06:00
2021-11-05 09:39:56 +01:00
2022-10-05 17:27:14 +01:00
2022-12-08 23:52:06 -08:00