summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-05-01 14:46:59 -0400
committerRich Felker <dalias@aerifal.cx>2018-05-01 14:46:59 -0400
commit375840c7d8e1f58a9bf40ced72fbe82635f49489 (patch)
treeed205abe92c31fcc9ee61d16fdc232a1f6e82589 /src/network
parente3c682ab5257aaa6739ef242a9676d897370e78e (diff)
downloadmusl-375840c7d8e1f58a9bf40ced72fbe82635f49489.tar.gz
avoid excessive stack usage in getcwd
to support the GNU extension of allocating a buffer for getcwd's result when a null pointer is passed without incurring a link dependency on free, we use a PATH_MAX-sized buffer on the stack and only duplicate it to allocated storage after the operation succeeds. unfortunately this imposed excessive stack usage on all callers, including those not making use of the GNU extension. instead, use a VLA to make stack allocation conditional.
Diffstat (limited to 'src/network')
0 files changed, 0 insertions, 0 deletions