Browse code

core:modparam.c In case of a STRING type to STR type convertion, garbage was written

The local "s" var was never written, a line was missing.

Marius Zbihlei authored on 14/01/2011 15:52:52
Showing 1 changed files
... ...
@@ -104,6 +104,7 @@ int set_mod_param_regex(char* regex, char* name, modparam_t type, void* val)
104 104
 					s.len = s.s ? strlen(s.s) : 0;
105 105
 					val2 = &s;
106 106
 				} else if (type == PARAM_STR && PARAM_TYPE_MASK(param_type) == PARAM_STRING) {
107
+					s = *(str*)val;
107 108
 					val2 = s.s;	/* zero terminator expected */
108 109
 				} else {
109 110
 					val2 = val;