Skip to content

Commit

Permalink
Fix data length calculation for hash (#3875)
Browse files Browse the repository at this point in the history
  • Loading branch information
eisenhauer committed Oct 28, 2023
1 parent 15326e6 commit e999646
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thirdparty/ffs/ffs/fm/fm_formats.c
Original file line number Diff line number Diff line change
Expand Up @@ -1987,7 +1987,7 @@ generate_format3_server_ID(server_ID_type *server_ID,
INT4 hash1 = 0, hash2 = 0;
UINT4 server_format_rep_length = ntohs(server_format_rep->format_rep_length);
if (server_format_rep->server_rep_version > 0) {
server_format_rep_length += (ntohs(server_format_rep->top_bytes_format_rep_length) >> 16);
server_format_rep_length += (ntohs(server_format_rep->top_bytes_format_rep_length) << 16);
}
if (server_format_rep_length > (1 << 26)) fprintf(stderr, "Format rep too long in generate_format_server_ID\n");
server_ID->length = 12;
Expand Down

0 comments on commit e999646

Please sign in to comment.