Michael Niedermayer
5260edee7e
sanm: Use the correct height variable in the decoded_size checks
...
Fixes integer overflow and out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4ee88db840
sanm: init sizes with the full frame size
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f0d9ccac89
sanm: reset frame sizes on buffer destruction
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
365270aec5
sanm: add forgotten check for decoded_size in old_codec37()
...
Fixes out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
da726a8763
paf, sanm: remove unused header after b05830169d
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
dc8dd2f6e9
sanm: Check MV before using them.
...
Fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7357ca900e
sanm: Check decoded_size.
...
This prevents a buffer overflow in rle_decode()
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
1bb05797ec
sanm: remove "duplicate" for loop.
...
Fixes input buffer overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
49b729d3af
sanm: check image dimensions before using them
...
Avoids integer overflows and out of array accesses.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b12d92efd6
avoid "0xFF << 24" as it is considered a integer overflow in C99
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
1b5069aa41
sanm: fix off by 1 error in draw_glyph()
...
This fix changes nothing as nothing passed a so large value
Fixes CID733785
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
2d42008757
sanm: make use of dsputil
...
About 27% faster decoding.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
1f9bc3104a
sanm: remove code duplication
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
3b9dd906d1
sanm: replace conditions in for loops with more common version
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Carl Eugen Hoyos
6eff277284
Make LucasArts Smush SANM palette opaque.
...
Reviewed-by: Paul B Mahol
13 years ago
Paul B Mahol
fd0b8c6ad5
sanm: silence warnings
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
69254f4628
LucasArts SMUSH video decoder
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago