[32290] in Kerberos
[patch] fix format errors (krb5-appl)
daemon@ATHENA.MIT.EDU (Guillaume Rousse)
Wed Apr 28 03:46:29 2010
Message-ID: <4BD7E7CE.6020500@inria.fr>
Date: Wed, 28 Apr 2010 09:46:22 +0200
From: Guillaume Rousse <Guillaume.Rousse@inria.fr>
MIME-Version: 1.0
To: kerberos@mit.edu
Content-Type: multipart/mixed; boundary="===============1218930102=="
Errors-To: kerberos-bounces@mit.edu
This is a cryptographically signed message in MIME format.
--===============1218930102==
Content-Type: multipart/signed; protocol="application/pkcs7-signature";
micalg=sha1; boundary="------------ms080501090708080300060406"
This is a cryptographically signed message in MIME format.
--------------ms080501090708080300060406
Content-Type: multipart/mixed; boundary="------------010802010709040800040408"
This is a multi-part message in MIME format.
--------------010802010709040800040408
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Here is another patch, for krb5-appl this time.
Merging thoses patches is quite helpful for various distributions
enforcing the use of -Wformat -Werror=3Dformat-security build flags.
--=20
BOFH excuse #297:
Too many interrupts
--------------010802010709040800040408
Content-Type: text/plain;
name="krb5-appl-1.0-fix-format-errors.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="krb5-appl-1.0-fix-format-errors.patch"
diff -Naur -x '*~' krb5-appl-1.0/gssftp/ftp/cmds.c krb5-appl-1.0-fix-form=
at-errors/gssftp/ftp/cmds.c
--- krb5-appl-1.0/gssftp/ftp/cmds.c 2009-11-05 21:15:06.000000000 +0100
+++ krb5-appl-1.0-fix-format-errors/gssftp/ftp/cmds.c 2010-04-27 21:12:09=
=2E000000000 +0200
@@ -1824,7 +1824,7 @@
len +=3D strlen(strncpy(&buf[len], argv[i], sizeof(buf) - 1 - len));
}
}
- if (command(buf) =3D=3D PRELIM) {
+ if (command("%s", buf) =3D=3D PRELIM) {
while (getreply(0) =3D=3D PRELIM);
}
}
diff -Naur -x '*~' krb5-appl-1.0/gssftp/ftpd/ftpd.c krb5-appl-1.0-fix-for=
mat-errors/gssftp/ftpd/ftpd.c
--- krb5-appl-1.0/gssftp/ftpd/ftpd.c 2009-11-18 06:07:46.000000000 +0100
+++ krb5-appl-1.0-fix-format-errors/gssftp/ftpd/ftpd.c 2010-04-27 21:16:1=
8.000000000 +0200
@@ -2360,7 +2360,7 @@
globerr =3D NULL;
dirlist =3D ftpglob(whichfiles);
if (globerr !=3D NULL) {
- reply(550, globerr);
+ reply(550, "%s", globerr);
return;
} else if (dirlist =3D=3D NULL) {
errno =3D ENOENT;
@@ -2536,7 +2536,7 @@
log_gss_error(int severity, OM_uint32 maj_stat, OM_uint32 min_stat,
const char *s)
{
- syslog(severity, s);
+ syslog(severity, "%s", s);
with_gss_error_text(log_gss_error_1, maj_stat, min_stat, severity);
}
=20
diff -Naur -x '*~' krb5-appl-1.0/telnet/telnet/utilities.c krb5-appl-1.0-=
fix-format-errors/telnet/telnet/utilities.c
--- krb5-appl-1.0/telnet/telnet/utilities.c 2009-07-08 23:22:07.000000000=
+0200
+++ krb5-appl-1.0-fix-format-errors/telnet/telnet/utilities.c 2010-04-27 =
21:25:18.000000000 +0200
@@ -797,13 +797,13 @@
if (pointer[0] =3D=3D TELOPT_OLD_ENVIRON) {
# ifdef ENV_HACK
if (old_env_var =3D=3D OLD_ENV_VALUE)
- fprintf(NetTrace, "\" (VALUE) " + noquote);
+ fprintf(NetTrace, "%s", "\" (VALUE) " + noquote);
else
# endif
- fprintf(NetTrace, "\" VAR " + noquote);
+ fprintf(NetTrace, "%s", "\" VAR " + noquote);
} else
#endif /* OLD_ENVIRON */
- fprintf(NetTrace, "\" VALUE " + noquote);
+ fprintf(NetTrace, "%s", "\" VALUE " + noquote);
noquote =3D 2;
break;
=20
@@ -813,23 +813,23 @@
if (pointer[0] =3D=3D TELOPT_OLD_ENVIRON) {
# ifdef ENV_HACK
if (old_env_value =3D=3D OLD_ENV_VAR)
- fprintf(NetTrace, "\" (VAR) " + noquote);
+ fprintf(NetTrace, "%s", "\" (VAR) " + noquote);
else
# endif
- fprintf(NetTrace, "\" VALUE " + noquote);
+ fprintf(NetTrace, "%s", "\" VALUE " + noquote);
} else
#endif /* OLD_ENVIRON */
- fprintf(NetTrace, "\" VAR " + noquote);
+ fprintf(NetTrace, "%s", "\" VAR " + noquote);
noquote =3D 2;
break;
=20
case ENV_ESC:
- fprintf(NetTrace, "\" ESC " + noquote);
+ fprintf(NetTrace, "%s", "\" ESC " + noquote);
noquote =3D 2;
break;
=20
case ENV_USERVAR:
- fprintf(NetTrace, "\" USERVAR " + noquote);
+ fprintf(NetTrace, "%s", "\" USERVAR " + noquote);
noquote =3D 2;
break;
=20
--------------010802010709040800040408--
--------------ms080501090708080300060406--
--===============1218930102==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
________________________________________________
Kerberos mailing list Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos
--===============1218930102==--