mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
fixed a possible segv when dealing with a blank password
(This used to be commit d5d0d0de50
)
This commit is contained in:
parent
9b323a3c0d
commit
306e4cbead
@ -40,8 +40,12 @@ kerb_prompter(krb5_context ctx, void *data,
|
||||
|
||||
memset(prompts[0].reply->data, 0, prompts[0].reply->length);
|
||||
if (prompts[0].reply->length > 0) {
|
||||
strncpy(prompts[0].reply->data, data, prompts[0].reply->length-1);
|
||||
prompts[0].reply->length = strlen(prompts[0].reply->data);
|
||||
if (data) {
|
||||
strncpy(prompts[0].reply->data, data, prompts[0].reply->length-1);
|
||||
prompts[0].reply->length = strlen(prompts[0].reply->data);
|
||||
} else {
|
||||
prompts[0].reply->length = 0;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user