git.samba.org
/
palcantara
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c813ee
)
compression: Add bounds check for first output buffer write
author
Joseph Sutton
<josephsutton@catalyst.net.nz>
Mon, 7 Mar 2022 23:11:51 +0000
(12:11 +1300)
committer
Andrew Bartlett
<abartlet@samba.org>
Thu, 12 May 2022 02:22:35 +0000
(
02:22
+0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
lib/compression/lzxpress.c
patch
|
blob
|
history
diff --git
a/lib/compression/lzxpress.c
b/lib/compression/lzxpress.c
index 65feed0aa730657e1db4a118f6417c929eaee736..647545bbac3c18aaab883964beed11dce3049875 100644
(file)
--- a/
lib/compression/lzxpress.c
+++ b/
lib/compression/lzxpress.c
@@
-73,9
+73,11
@@
ssize_t lzxpress_compress(const uint8_t *uncompressed,
}
uncompressed_pos = 0;
+ compressed_pos = 0;
indic = 0;
+ CHECK_OUTPUT_BYTES(sizeof(uint32_t));
*(uint32_t *)compressed = 0;
- compressed_pos = sizeof(uint32_t);
+ compressed_pos
+
= sizeof(uint32_t);
indic_pos = 0;
indic_bit = 0;