Commit 1075351
Validate tensor sizes during method load (#7663)
Summary:
If a tensor's `sizes` array contains a negative value, the TensorImpl ctor will panic.
Validate sizes before creating the TensorImpl to treat this as a non-fatal error when loading malformed PTE files.
Reviewed By: JacobSzwejbka
Differential Revision: D681800291 parent 1b7b10e commit 1075351
1 file changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
104 | 117 | | |
105 | 118 | | |
106 | 119 | | |
| |||
0 commit comments