ACK: [PATCH] lib: fwts_olog: ensure buffer is null terminated
ivanhu
ivan.hu at canonical.com
Wed Feb 8 03:22:05 UTC 2017
On 2017年02月01日 15:37, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> This fixes an issue detected by CoverityScan static analysis
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/lib/src/fwts_olog.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/lib/src/fwts_olog.c b/src/lib/src/fwts_olog.c
> index 703a6bb..59ac018 100644
> --- a/src/lib/src/fwts_olog.c
> +++ b/src/lib/src/fwts_olog.c
> @@ -151,6 +151,7 @@ fwts_list *fwts_olog_read(fwts_framework *fw)
> goto olog_cleanup_msglog_outfile;
>
> read_actual = fread(buffer, 1, len, msglog_outfile_f);
> + buffer[read_actual] = '\0';
> if (read_actual == (size_t)len) {
> list = fwts_list_from_text(buffer);
> free(buffer);
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list