Empty initial responses were interpreted as the absense of an initial response,
thereby triggering an empty server challenge and a subsequent erroneous failure.
This was not how these tests were intended.
test_expect_error_string(test_case->expect_error);
request->state = AUTH_REQUEST_STATE_NEW;
- unsigned char *input_dup = test_case->len == 0 ? NULL :
- i_memdup(test_case->in, test_case->len);
+ unsigned char *input_dup = i_malloc(I_MAX(test_case->len, 1));
+ memcpy(input_dup, test_case->in, test_case->len);
request->initial_response = input_dup;
request->initial_response_len = test_case->len;
auth_request_initial(request);