(krb5_ui_method_read_string): use the fill in length
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15059 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -160,7 +160,7 @@ krb5_ui_method_read_string(UI *ui, UI_STRING *uis)
|
|||||||
case UIT_VERIFY:
|
case UIT_VERIFY:
|
||||||
case UIT_PROMPT:
|
case UIT_PROMPT:
|
||||||
length = UI_get_result_maxsize(uis);
|
length = UI_get_result_maxsize(uis);
|
||||||
buffer = malloc(password_data.length);
|
buffer = malloc(length);
|
||||||
if (buffer == NULL) {
|
if (buffer == NULL) {
|
||||||
krb5_set_error_string(ui_data->context, "malloc: out of memory");
|
krb5_set_error_string(ui_data->context, "malloc: out of memory");
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user