summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Christopher Ferris <cferris@google.com> 2024-02-09 14:51:22 -0800
committer Christopher Ferris <cferris@google.com> 2024-02-09 14:54:00 -0800
commit39d091bc118177a2b08109204060cc65c7a08ff5 (patch)
tree0aaab472c14e54f9d6bde0d6e24bf6b595c74800 /api/api.go
parent4e7a03e7918494d36ace13f2d04ea520676c5108 (diff)
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
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions