]> git.ipfire.org Git - thirdparty/zstd.git/commit
[legacy] Fix ZSTDv0*_decodeSequence() 1595/head
authorNick Terrell <terrelln@fb.com>
Fri, 19 Apr 2019 18:34:52 +0000 (11:34 -0700)
committerNick Terrell <terrelln@fb.com>
Fri, 19 Apr 2019 18:34:52 +0000 (11:34 -0700)
commit0fd322f812211e653a83492c0c114b933f8b6bc5
treec45de9a08dce66b11e064a963568f5f9e331c914
parent9ad7ea44ec9644c618c2e82be5960d868e48745d
[legacy] Fix ZSTDv0*_decodeSequence()

* Version <= 0.5 could read beyond the end of `dumps`, which points into
  the input buffer.
* Check the validity of `dumps` before using it, if it is out of bounds
  return garbage values. There is no return code for this function.
* Introduce `MEM_readLE24()` for simplicity, since I don't want to trust
  that there is an extra byte after `dumps`.
lib/legacy/zstd_v01.c
lib/legacy/zstd_v02.c
lib/legacy/zstd_v03.c
lib/legacy/zstd_v04.c
lib/legacy/zstd_v05.c