Use a dynamically-allocated line buffer and resize as needed.
authormillert <millert@openbsd.org>
Wed, 27 Sep 2023 21:06:33 +0000 (21:06 +0000)
committermillert <millert@openbsd.org>
Wed, 27 Sep 2023 21:06:33 +0000 (21:06 +0000)
commit08e9b19a4d03c0460760a69df3eff400acd69e32
tree372aeb2351f55c4e162ca355d69257345f2f8aef
parent127a57c428df73074977eea11742e03dd7c363cd
Use a dynamically-allocated line buffer and resize as needed.
Fixes a buffer overflow for lines over 2048 bytes.
Problem reported by Crystal Kolipe.  OK deraadt@
usr.bin/deroff/deroff.c