Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5cd49b7 authored by Martin Willers's avatar Martin Willers Committed by Benjamin Dobell
Browse files

fix --stdout-errors handling

When using --stdout-errors, the messages written to stdout contained garbage.

Inside vfprintf(), each va_arg() consumes one entry from the va_args.
Trying to use the same va_args variable again results in undefined behavior
as subsequent va_arg() invocations continue to read from memory past the
actual variable space.

Instead, a copy has to be made with va_copy() and this be used for
outputting to stdout.
parent 9f957a19
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment