Using just "key" parameter instead of "key=value" usually worked, but for
some keys the code assumed that there was a value and it dereferenced NULL.
We'll solve this by just using value="" instead of value=NULL.
Found by Coverity
uid_t uid;
gid_t gid;
+ i_assert(value != NULL);
+
if (strcmp(name, "uid") == 0) {
uid = userdb_parse_uid(request, value);
if (uid == (uid_t)-1) {
str_truncate(str, 0);
var_expand(str, value + 1, table);
value = str_c(str);
+ } else {
+ value = "";
}
auth_request_set_userdb_field(auth_request, key, value);
}
i_assert((count % 2) == 0);
for (i = 0; i < count; i += 2) {
if (args[i+1] == NULL)
- value = NULL;
+ value = "";
else {
str_truncate(str, 0);
var_expand(str, args[i+1], table);