summaryrefslogtreecommitdiffstats
path: root/src/lib/syscall_stub.S
diff options
context:
space:
mode:
authorZach Clark <zach@ibm.com>2019-09-26 09:00:27 -0500
committerWilliam G Hoffa <wghoffa@us.ibm.com>2019-09-27 09:48:43 -0500
commit19f75b84d3805b45c54d0a92d4b47d0c2900dd08 (patch)
treec6ea89362708f947e21b1cceb51bbd920960c5f2 /src/lib/syscall_stub.S
parentb93f63ad337aeb9cc09cffae6e430010d0c4867f (diff)
downloadblackbird-hostboot-19f75b84d3805b45c54d0a92d4b47d0c2900dd08.tar.gz
blackbird-hostboot-19f75b84d3805b45c54d0a92d4b47d0c2900dd08.zip
Make snprintf always terminate the output buffer
Previously, the snprintf function would not terminate the output buffer if it had already filled the entire buffer with characters. This would lead to the creation of unterminated strings which could result in buffer overreads and/or information disclosures. This commit fixes that issue, making it conform to the C99 standard (section 7.19.6.5). Also addresses a buffer underflow that could occur when the source string to an sprintf call contains too many \b characters. Change-Id: Ie516b1c7d74d37cc5f48fe03693f096fe4bd6c02 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84349 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: William G Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/lib/syscall_stub.S')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud