]> git.ipfire.org Git - thirdparty/glibc.git/commit
misc: syslog: Use fixed-sized buffer and remove memstream
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 5 Oct 2021 12:58:09 +0000 (09:58 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 15 Apr 2022 13:41:54 +0000 (10:41 -0300)
commita583b6add407c17cdcd4146be3876061a5e1d555
tree248962242b03d7dbcb224f63b6efe066ef6262d2
parentf9f5c70e7f2ba928fe86801b8d05ffe8f4972d59
misc: syslog: Use fixed-sized buffer and remove memstream

A fixed-sized buffer is used instead of memstream for messages up to
1024 bytes to avoid the potential BUFSIZ (8K) malloc and free for
each syslog call.

Also, since the buffer size is know, memstream is replaced with a
malloced buffer for larger messages.

Checked on x86_64-linux-gnu.
misc/syslog.c