File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -623,7 +623,8 @@ static bool get_pb_encoded_buffer(
623
623
static bool inheritance_send_in_chunks (inheritance_query_t * query ,
624
624
const uint8_t * buffer ,
625
625
const size_t buffer_len ) {
626
- size_t total_count = ((buffer_len + 1 ) / ENCRYPTED_CHUNK_SIZE );
626
+ size_t total_count =
627
+ ((buffer_len + ENCRYPTED_CHUNK_SIZE - 1 ) / ENCRYPTED_CHUNK_SIZE );
627
628
size_t remaining_size = (size_t )buffer_len ;
628
629
size_t offset = 0 ;
629
630
inheritance_result_t result =
@@ -674,6 +675,7 @@ static bool send_encrypted_data(inheritance_query_t *query) {
674
675
sizeof (buffer ),
675
676
& bytes_encoded ) ||
676
677
!inheritance_send_in_chunks (query , buffer , bytes_encoded )) {
678
+ // TODO: throw encryption failed error
677
679
return false;
678
680
}
679
681
return true;
You can’t perform that action at this time.
0 commit comments