Date: Thu, 6 Mar 2003 02:11:25 +0100 (CET) From: till toenges <tt@mail.isis.de> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/48963: bdes.c args to err() in wrong order Message-ID: <200303060111.h261BPcT030799@kyon.de>
next in thread | raw e-mail | index | archive | help
>Number: 48963
>Category: bin
>Synopsis: bdes.c args to err() in wrong order
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Mar 05 17:20:13 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: jail user
>Release: FreeBSD 4.7-RELEASE-p3 i386
>Organization:
>Environment:
System: FreeBSD hoellenmaschine.kyon.de 4.7-RELEASE-p3 FreeBSD 4.7-RELEASE-p3 #2: Tue Feb 4 01:34:59 CET 2003 juser@hoellenmaschine.kyon.de:/usr/obj/usr/src/sys/MYKERNEL i386
>Description:
the function is defined as
err(n, s)
int n; /* offending block number */
char *s; /* the message */
but is called with char *, int in some macros.
>How-To-Repeat:
look at the source.
>Fix:
--- bdes.diff begins here ---
--- /usr/src/secure/usr.bin/bdes/bdes.c Fri Sep 22 11:42:03 2000
+++ bdes.c Thu Mar 6 01:42:08 2003
@@ -102,22 +102,22 @@
#ifdef FASTWAY
#define DES_KEY(buf) \
if (des_setkey(buf)) \
- err("des_setkey", 0);
+ err(0, "des_setkey");
#define DES_XFORM(buf) \
if (des_cipher(buf, buf, 0L, (inverse ? -1 : 1))) \
- err("des_cipher", 0);
+ err(0, "des_cipher");
#else
#define DES_KEY(buf) { \
char bits1[64]; /* bits of key */ \
expand(buf, bits1); \
if (setkey(bits1)) \
- err("setkey", 0); \
+ err(0, "setkey"); \
}
#define DES_XFORM(buf) { \
char bits1[64]; /* bits of message */ \
expand(buf, bits1); \
if (encrypt(bits1, inverse)) \
- err("encrypt", 0); \
+ err(0, "encrypt"); \
compress(bits1, buf); \
}
#endif
--- bdes.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303060111.h261BPcT030799>
