From: bert hubert Date: Thu, 5 Mar 2015 11:54:57 +0000 (+0100) Subject: fix up endianness issue in our crypto hopefully X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~88^2~92 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=313ed7c5ce2589ce49468e222d765ea4a88bb3c9;p=pdns fix up endianness issue in our crypto hopefully --- diff --git a/pdns/sodcrypto.hh b/pdns/sodcrypto.hh index dd906903a..8514dd722 100644 --- a/pdns/sodcrypto.hh +++ b/pdns/sodcrypto.hh @@ -23,8 +23,9 @@ struct SodiumNonce void increment() { - uint64_t* p = (uint64_t*)value; - (*p)++; + uint32_t* p = (uint32_t*)value; + uint32_t count=htonl(*p); + *p=ntohl(++count); } string toString() const