Re: Avoid an odd undefined behavior with memcmp (src/bin/pg_rewind/pg_rewind.c)

2024-06-02 Thread Ranier Vilela
Em qua., 29 de mai. de 2024 às 22:41, Long Song escreveu: > > Hi Ranier, > > > > > IMO, I think that pg_rewind can have a security issue, > > if two files are exactly the same, they are considered different. > > Because use of structs with padding values is unspecified. > Logically you are right.

Re: Avoid an odd undefined behavior with memcmp (src/bin/pg_rewind/pg_rewind.c)

2024-05-29 Thread David Rowley
On Wed, 29 May 2024 at 07:02, Ranier Vilela wrote: > The function *perform_rewind* has an odd undefined behavior. > The function memcmp/, compares bytes to bytes. > > IMO, I think that pg_rewind can have a security issue, > if two files are exactly the same, they are considered different. > Becaus

Avoid an odd undefined behavior with memcmp (src/bin/pg_rewind/pg_rewind.c)

2024-05-28 Thread Ranier Vilela
Hi. The function *perform_rewind* has an odd undefined behavior. The function memcmp/ , compares bytes to bytes. IMO, I think that pg_rewind can have a security issue, if two files are exactly the same, they are considered different. Because use of