ACK: [PATCH] lib: fwts_olog: ensure buffer is null terminated
Alex Hung
alex.hung at canonical.com
Tue Feb 7 03:21:15 UTC 2017
On 2017-02-01 03:37 PM, 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: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list