core-util: Avoid usage of pa_strbuf in pa_escape()
authorGeorg Chini <georg@chini.tk>
Tue, 26 Mar 2019 09:39:21 +0000 (10:39 +0100)
committerTanu Kaskinen <tanuk@iki.fi>
Sat, 25 May 2019 12:28:41 +0000 (15:28 +0300)
commitab9fed95235f51c3020f1cc5d8460e07c74b09b8
tree59c107a19469866060c37f99613c31622aa21937
parentf34ea0f0c303bf557fb4af6bda5e9588c7c20ffb
core-util: Avoid usage of pa_strbuf in pa_escape()

The current code uses a pa_strbuf to construct the escaped string. This
will generate a linked list member for each character which may be very
inefficient.
This patch avoids the use of pa_strbuf by allocating a sufficiently large
string which can be filled with the output data.
src/pulsecore/core-util.c