[PATCH 1/6] util: virerror: Don't use stack'd buffers in error report helpers

Ján Tomko jtomko at redhat.com
Tue Mar 2 18:23:50 UTC 2021


On a Tuesday in 2021, Peter Krempa wrote:
>This was (probably) a relict from times when we cared about OOM
>conditions and the possibility to report the error. Nowadays it doesn't
>make sense as virRaiseErrorFull will do an allocated copy of the strings
>and also concatenate the error message prefix with the detail which
>doesn't guarantee that the result will be less than 1024 chars.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/util/virerror.c | 47 +++++++++++++++++++--------------------------
> 1 file changed, 20 insertions(+), 27 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 484 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20210302/7ed7082a/attachment-0001.sig>


More information about the libvir-list mailing list