File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,19 @@ static int s_finalize_checksum(struct aws_checksum_stream *impl) {
3535 return aws_raise_error (AWS_ERROR_S3_CHECKSUM_CALCULATION_FAILED );
3636 }
3737 struct aws_byte_cursor checksum_result_cursor = aws_byte_cursor_from_buf (& impl -> checksum_result );
38- AWS_FATAL_ASSERT (aws_base64_encode (& checksum_result_cursor , impl -> encoded_checksum_output ) == AWS_OP_SUCCESS );
38+ if (aws_base64_encode (& checksum_result_cursor , impl -> encoded_checksum_output ) != AWS_OP_SUCCESS ) {
39+ AWS_LOGF_ERROR (
40+ AWS_LS_S3_CLIENT ,
41+ "Failed to base64 encode checksum with error code %d (%s). Output capacity: %zu length %zu" ,
42+ aws_last_error (),
43+ aws_error_str (aws_last_error ()),
44+ impl -> encoded_checksum_output -> capacity ,
45+ impl -> encoded_checksum_output -> len );
46+ aws_byte_buf_reset (& impl -> checksum_result , true);
47+ impl -> checksum_finalized = true;
48+ return aws_raise_error (AWS_ERROR_S3_CHECKSUM_CALCULATION_FAILED );
49+ }
50+
3951 impl -> checksum_finalized = true;
4052 return AWS_OP_SUCCESS ;
4153}
You can’t perform that action at this time.
0 commit comments