Files
odoo_source/odoo
Xavier Morel 62b731a3b8 [FIX] core: possibility of allocation error in native magic libraries
Both of the native `magic` libraries can trigger an allocation error
if the buffer being sniffed is large. This results in nothing useful
for the user and just triggers and exception when trying to create
large attachments (in the hundreds of MBs).

Fix by implementing the workaround suggested in
ahupp/python-magic#82, under the assumption that it should also work
fine for Debian's python-magic.

The pure-python trivial version of odoo should not have this issue, as
it does not normally copy the source buffer in full, it just seeks and
slices the buffer, and occasionally parses it as a zip (but does not
normally load everything in memory).

Task-2722110

closes odoo/odoo#83190

X-original-commit: 94fc66452f28a8c64b4077d6cc2dd17ea1f00aa6
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-01-21 15:58:59 +00:00
..
…
2022-01-19 16:52:23 +00:00
2021-12-09 14:36:58 +00:00
2022-01-19 16:52:23 +00:00
…