Fix format string errors in fltk pinentry

if the mesage in question had formatting escape chars, this might be
able to cause a crash (or worse) in the pinentry.

Gbp-Pq: Name 0003-Fix-format-string-errors-in-fltk-pinentry.patch
This commit is contained in:
Daniel Kahn Gillmor 2018-02-05 20:06:02 -05:00 committed by openKylinBot
parent 2158159d89
commit 1540cc36b7
1 changed files with 3 additions and 3 deletions

View File

@ -241,12 +241,12 @@ static int fltk_cmd_handler(pinentry_t pe)
if (pe->one_button)
{
fl_ok = ok.c_str();
fl_message(message);
fl_message("%s", message);
result = 1; // OK
}
else if (pe->notok)
{
switch (fl_choice(message, ok.c_str(), cancel.c_str(), pe->notok))
switch (fl_choice("%s", ok.c_str(), cancel.c_str(), pe->notok, message))
{
case 0: result = 1; break;
case 2: result = 0; break;
@ -256,7 +256,7 @@ static int fltk_cmd_handler(pinentry_t pe)
}
else
{
switch (fl_choice(message, ok.c_str(), cancel.c_str(), NULL))
switch (fl_choice("%s", ok.c_str(), cancel.c_str(), NULL, message))
{
case 0: result = 1; break;
default: