In UI_UTIL_read_pw(), we should look at the size parameter, not at BUFSIZ.
Submitted by Götz Babin-Ebell <babinebell@trustcenter.de>
This commit is contained in:
parent
c4da6dd38a
commit
b57c98df7b
@ -71,12 +71,15 @@ int UI_UTIL_read_pw(char *buf,char *buff,int size,const char *prompt,int verify)
|
|||||||
int ok = 0;
|
int ok = 0;
|
||||||
UI *ui;
|
UI *ui;
|
||||||
|
|
||||||
|
if (size < 1)
|
||||||
|
return -1;
|
||||||
|
|
||||||
ui = UI_new();
|
ui = UI_new();
|
||||||
if (ui)
|
if (ui)
|
||||||
{
|
{
|
||||||
ok = UI_add_input_string(ui,prompt,0,buf,0,BUFSIZ-1);
|
ok = UI_add_input_string(ui,prompt,0,buf,0,size-1);
|
||||||
if (ok == 0 && verify)
|
if (ok == 0 && verify)
|
||||||
ok = UI_add_verify_string(ui,prompt,0,buff,0,BUFSIZ-1,
|
ok = UI_add_verify_string(ui,prompt,0,buff,0,size-1,
|
||||||
buf);
|
buf);
|
||||||
if (ok == 0)
|
if (ok == 0)
|
||||||
ok=UI_process(ui);
|
ok=UI_process(ui);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user