Explorar o código

dselect: Do not treat licensestring as a format string

This was spotted by a run with the clang++ static analyzer.
Guillem Jover %!s(int64=14) %!d(string=hai) anos
pai
achega
3c3a1adfa0
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      dselect/main.cc

+ 2 - 3
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())