From 656875dfebe724c31896e3073780638e2c213f81 Mon Sep 17 00:00:00 2001 From: Cameron Kaiser Date: Thu, 21 Sep 2023 11:59:29 -0700 Subject: [PATCH] fix next invalid pointer for correctness, followup from roytam1/ --- media/libwebp/src/utils/huffman_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/libwebp/src/utils/huffman_utils.c b/media/libwebp/src/utils/huffman_utils.c index 9efd6283a..efb9e250f 100644 --- a/media/libwebp/src/utils/huffman_utils.c +++ b/media/libwebp/src/utils/huffman_utils.c @@ -267,11 +267,11 @@ int VP8LHuffmanTablesAllocate(int size, HuffmanTables* huffman_tables) { // Have 'segment' point to the first segment for now, 'root'. HuffmanTablesSegment* const root = &huffman_tables->root; huffman_tables->curr_segment = root; + root->next = NULL; // Allocate root. root->start = (HuffmanCode*)WebPSafeMalloc(size, sizeof(*root->start)); if (root->start == NULL) return 0; root->curr_table = root->start; - root->next = NULL; root->size = size; return 1; }