]> granicus.if.org Git - ejabberd/commitdiff
Avoid #state.lang type errors in corner cases
authorHolger Weiss <holger@zedat.fu-berlin.de>
Tue, 29 Apr 2014 09:41:24 +0000 (11:41 +0200)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Tue, 29 Apr 2014 09:41:24 +0000 (11:41 +0200)
If #state.lang is used before being initialized to some binary string,
the translation code would crash.

src/ejabberd_c2s.erl

index 33d76b07c83624a401135b17b58eecc0bf093991..5d8a7bb07ce0abdf49d9a3bd2f8b731c6d0a95ff 100644 (file)
                auth_module = unknown,
                ip,
                aux_fields = [],
-               lang}).
+               lang = <<"">>}).
 
 %-define(DBGFSM, true).