[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I think I have fixed it somehow.

From: David Barksdale
Subject: Re: I think I have fixed it somehow.
Date: Sun, 8 Nov 2020 08:33:58 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1

I don't understand how swapping htonl with ntohl made any difference,
they are the same function. If you're on a big-endian system they both
do nothing, if you're on a little-endian system they both swap byte
order, you'd have to be on some insane "middle-endian" system where one
rotates left and the other rotates right for them to do different things.

On 11/7/20 6:58 PM, TheJackiMonster wrote:
> Hey,
> funny story... I was actually debugging my code of the messenger
> service and encountered a weird bug which was caused by an assert in
> one of my latest changes (the signing via EGO keys).
> It turned out the assert failed because of a wrongly used htonl()
> instead of ntohl() to check the signatures size. But I was really
> confused of this because I was very certain, I had copied it from the
> signing macro for ECDSA keys to not make any mistake. ^^'
> ...well, I did: So it seemed that both (ECDSA and EDDSA) sign makros
> and the one (ECDSA) verify makro swapped htonl() and ntohl() in its
> first assert.
> So I tried correcting it and it looks like nearly all of the tests pass
> now. Before most tests didn't even start when I called 'make check'
> (only 50) and one test of them failed while one other skipped (which I
> thought was normal from such a huge project) but that simply changed
> just by flipping this typo. I have never seen so much green flowing
> down during debugging before. ^^'
> I guess, I will commit the change to the main branch. Lucky thing to
> encounter. ^-^
> Oh and by the way the messenger service seems to work fine now as well
> but I still need to write more testcases to make sure huge groups work
> actually as intended.
> Happy hacking
> Jacki

reply via email to

[Prev in Thread] Current Thread [Next in Thread]