]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
compression: Add range check for indic_pos
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Mon, 7 Mar 2022 07:30:42 +0000 (20:30 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 12 May 2022 02:22:35 +0000 (02:22 +0000)
This now matches the other use of indic_pos.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
lib/compression/lzxpress.c

index b7b365f165c1913e7781fbe035c8fa106e9501e2..18e4903392b28694699fb7c182387777545bbf23 100644 (file)
@@ -196,6 +196,7 @@ ssize_t lzxpress_compress(const uint8_t *uncompressed,
                        if (indic_bit == 32) {
                                PUSH_LE_U32(compressed, indic_pos, indic);
                                indic_bit = 0;
+                               CHECK_OUTPUT_BYTES(sizeof(uint32_t));
                                indic_pos = compressed_pos;
                                compressed_pos += sizeof(uint32_t);
                        }