pytorch/torch/csrc/generic
Gregory Chanan 2070834b9e Improve error checking of Storage._writeFile. (#46036)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/46036

Previously, this function didn't do error-bounds checking on the GetItem (GET_ITEM) calls, which led to issues like https://github.com/pytorch/pytorch/issues/46020.

A better solution would be to use pybind, but given writing the file is going to dominate bounds checking, this is strictly better.

Test Plan: Imported from OSS

Reviewed By: mruberry

Differential Revision: D24228370

Pulled By: gchanan

fbshipit-source-id: f5d0a3d21ff12b4380beefe1e9954fa81ea2f567
2020-10-12 11:10:04 -07:00
..
serialization.cpp Back out "Revert D21171334: [pytorch][PR] Change StorageImpl to track byte count rather than element count" (#37893) 2020-05-05 22:43:15 -07:00
serialization.h Fix some bugs with zipfile serialization (#32244) 2020-02-05 15:32:14 -08:00
Storage.cpp Do not use PRId64 in torch/csrc (#44767) 2020-09-17 14:00:02 -07:00
Storage.h Delete THP_CORE macro; partially replace with THP_BUILD_MAIN_LIB (#29143) 2019-11-06 15:02:02 -08:00
StorageMethods.cpp Improve error checking of Storage._writeFile. (#46036) 2020-10-12 11:10:04 -07:00
StorageSharing.cpp Back out "Revert D21171334: [pytorch][PR] Change StorageImpl to track byte count rather than element count" (#37893) 2020-05-05 22:43:15 -07:00
utils.cpp Remove THD (#22065) 2019-06-25 12:19:13 -07:00
utils.h Python API for Complex Storage and storage copy logic (#35771) 2020-05-01 11:47:22 -07:00