]> source.dussan.org Git - rspamd.git/commitdiff
[CritFix] Do not use volatile Lua strings as UCL keys
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 2 May 2018 18:04:21 +0000 (19:04 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 2 May 2018 18:05:14 +0000 (19:05 +0100)
Issue: #2211
Closes: #2211
contrib/libucl/lua_ucl.c

index 045308097ff9881462cc464dc4b6bf5757a091ab..d2557a57f40745f3acfa7087bbfc4e2c18e3e2c8 100644 (file)
@@ -410,8 +410,8 @@ ucl_object_lua_fromtable (lua_State *L, int idx, ucl_string_flags_t flags)
 
                                DL_FOREACH (obj, cur) {
                                        if (cur->keylen == 0) {
-                                               cur->keylen = keylen;
-                                               cur->key = k;
+                                               cur->keylen = obj->keylen;
+                                               cur->key = obj->key;
                                        }
                                }
                        }