say: check size before write
We potentially pass negative size to safe_write in say_default if total is negative. We can't hit this issue currently because formatting functions currently do not return -1. Yet let's check total value where appropriate. By the way fix restoring errno in log_vsay. format_log_entry_full is introduced for this purpuse as SNPRINT macro returns in case of error. Also add assertion to safe_write. This patch addresses coverity complain 1527154 (https://scan7.scan.coverity.com/reports.htm#v43693/p13437/fileInstanceId=129123623&defectInstanceId=18608452&mergedDefectId=1527154) Part of #7913 NO_DOC=code health NO_CHANGELOG=code health NO_TEST=code health
Loading
Please register or sign in to comment