Mercurial > octave
changeset 32088:e2911d0176dc stable
uniconv-wrappers: Avoid freeing uninitialized pointer (bug #64182).
* liboctave/wrappers/uniconv-wrappers.c (octave_u8_conv_to_encoding_intern):
Initialize pointer with NULL that might be freed without assignment otherwise.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Fri, 12 May 2023 08:00:41 +0200 |
parents | 66ecc0d4d6ce |
children | 212145b8e5f0 d313e8ece0b8 |
files | liboctave/wrappers/uniconv-wrappers.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/wrappers/uniconv-wrappers.c Sun May 07 18:13:19 2023 +0200 +++ b/liboctave/wrappers/uniconv-wrappers.c Fri May 12 08:00:41 2023 +0200 @@ -67,7 +67,7 @@ || (tocode[2] != 'f' && tocode[2] != 'F')) padlen++; - uint8_t *u8_str; + uint8_t *u8_str = NULL; const uint8_t *cu8_str; if (srclen < padlen) {