While reviewing the code in verify.c, I noticed a logic error involving the use of strcmp when comparing hash values. The current implementation uses: ```c if (!strcmp(hash, calculated_hash)) { // hash mismatch } ``` This condition is incorrect if the intention is to detect mismatched hashes, since strcmp(a, b) returns 0 when strings are equal.
Activity
[pgmoneta#640]Fix Hashvalidation
[pgmoneta#640]Fix Hash Validation
[-][Bug]Incorrect strcmp Logic in verify.c Hash Comparison[/-][+][Bug]Incorrect hash mismatch[/+][-][Bug]Incorrect hash mismatch[/-][+][Bug]hash mismatch logic[/+]jesperpedersen commentedon May 25, 2025
@jchrys Can you send a patch for it ?
[pgmoneta#640]Fix Hash Validation
[#640]Fix Hash Validation