Commit 9079ab7
sha1_file: don't convert off_t to size_t too early to avoid potential die()
xsize_t() checks if an off_t argument can be safely converted to
a size_t return value. If the check is executed too early, it could
fail for large files on 32-bit architectures even if the size_t code
path is not taken. Other paths might be able to handle the large file.
Specifically, index_stream_convert_blob() is able to handle a large file
if a filter is configured that returns a small result.
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 9035d75 commit 9079ab7
1 file changed
+9
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3178 | 3178 | | |
3179 | 3179 | | |
3180 | 3180 | | |
3181 | | - | |
3182 | 3181 | | |
| 3182 | + | |
| 3183 | + | |
| 3184 | + | |
| 3185 | + | |
3183 | 3186 | | |
3184 | 3187 | | |
3185 | 3188 | | |
3186 | 3189 | | |
3187 | | - | |
| 3190 | + | |
3188 | 3191 | | |
3189 | | - | |
| 3192 | + | |
| 3193 | + | |
3190 | 3194 | | |
3191 | | - | |
| 3195 | + | |
| 3196 | + | |
3192 | 3197 | | |
3193 | 3198 | | |
3194 | 3199 | | |
| |||
0 commit comments