Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 39d091bc authored by Christopher Ferris's avatar Christopher Ferris
Browse files

Use a file descriptor in decodeFile.

When trying to decode a file, using a stream can lead to a
pathological case where the entire file is read into memory.
If a large file is encountered, the entire file will be read
into memory and result in different types of crashes.

So instead of using a stream, use a file descriptor to prevent
this case.

Bug: 309868782

Test: Put a large file on the system. Start the files app and
Test: observe no crashes.
Change-Id: I59cbab80af68eb3da4b46df81a5c26bf041778d8
parent 4e7a03e7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment