git.samba.org
/
janger
/
samba-autobuild-v4-18-test
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5aafff0
)
lib/compression: Fix length check
author
Joseph Sutton
<josephsutton@catalyst.net.nz>
Mon, 9 Jan 2023 02:00:14 +0000
(15:00 +1300)
committer
Jeremy Allison
<jra@samba.org>
Tue, 10 Jan 2023 20:22:32 +0000
(20:22 +0000)
Put the division on the correct side of the inequality.
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/compression/pycompression.c
patch
|
blob
|
history
diff --git
a/lib/compression/pycompression.c
b/lib/compression/pycompression.c
index 00a207008fb7bf4f299f428455c622c2fd2c93cc..f67b0ddbe39ba22488a9108d2d6f16c8c383712c 100644
(file)
--- a/
lib/compression/pycompression.c
+++ b/
lib/compression/pycompression.c
@@
-126,7
+126,7
@@
static PyObject *plain_decompress(PyObject *mod, PyObject *args)
*/
if (src_len <= 3333333) {
alloc_len = 10000000;
- } else if (src_len
/ 3 >= UINT32_MAX
) {
+ } else if (src_len
> UINT32_MAX / 3
) {
alloc_len = UINT32_MAX;
} else {
alloc_len = src_len * 3;