]> source.dussan.org Git - rspamd.git/commitdiff
Fix endiannes in lua_radix search.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 7 Nov 2014 14:22:12 +0000 (14:22 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 7 Nov 2014 14:22:12 +0000 (14:22 +0000)
src/lua/lua_config.c

index 43be4b98858c7a5f79e8315d03000fb021c64be9..9533c17d1a5f83a2817f2d16d6dd5e0bbde51327 100644 (file)
@@ -1294,7 +1294,7 @@ lua_radix_get_key (lua_State * L)
        guint32 key;
 
        if (radix) {
-               key = luaL_checkint (L, 2);
+               key = htonl (luaL_checkint (L, 2));
 
                if (radix_find_compressed (radix, (guint8 *)&key, sizeof (key))
                                != RADIX_NO_VALUE) {