Commit 1b954e41 authored by Sören Tempel's avatar Sören Tempel

Fix segfault in log_internal if prefix is APK_OUT_LOG_ONLY

This commit fixes a regression which was introduced in changeset
646c8344. If apk_out_fmt() is called
while out->log is set and prefix is set to APK_OUT_LOG_ONLY, then
apk_out_fmt() would pass this prefix to log_internal() which would, in
turn, attempt to write it to standard out using fprintf().
Unfortunately, doing so wont work as intended if prefix is ((char*)-1)
(i.e. APK_OUT_LOG_ONLY) and will cause a segmentation fault instead.

This commit fixes this segmentation fault by not printing the prefix in
log_internal() if it is either NULL or APK_OUT_LOG_ONLY.
parent 646c8344
Pipeline #77433 passed with stage
in 1 minute and 15 seconds