The following commit has been merged in the master branch:
commit 3c3a1adfa0a1a4217587ac06b1bad799d1bbbb2d
Author: Guillem Jover <[email protected]>
Date:   Thu Dec 8 02:20:26 2011 +0100

    dselect: Do not treat licensestring as a format string
    
    This was spotted by a run with the clang++ static analyzer.

diff --git a/dselect/main.cc b/dselect/main.cc
index ffb5597..357f323 100644
--- a/dselect/main.cc
+++ b/dselect/main.cc
@@ -170,7 +170,7 @@ printversion(const struct cmdinfo *ci, const char *value)
 {
   printf(gettext(programdesc), DSELECT, DPKG_VERSION_ARCH);
   printf("%s", gettext(copyrightstring));
-  printf(gettext(licensestring), DSELECT);
+  printf("%s", gettext(licensestring));
 
   m_output(stdout, _("<standard output>"));
 
@@ -423,8 +423,7 @@ refreshmenu(void)
 
   attrset(A_NORMAL);
   addstr(gettext(copyrightstring));
-  sprintf(buf, gettext(licensestring), DSELECT);
-  addstr(buf);
+  addstr(gettext(licensestring));
 
   modstatdb_init();
   if (!modstatdb_can_lock())

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to