[PINENTRY PATCH] Fix format string errors in fltk pinentry

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PINENTRY PATCH] Fix format string errors in fltk pinentry

Daniel Kahn Gillmor-7
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
---
 fltk/main.cxx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fltk/main.cxx b/fltk/main.cxx
index 8e7e726..5d226ed 100644
--- a/fltk/main.cxx
+++ b/fltk/main.cxx
@@ -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:
--
2.15.1


_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel