[BusyBox] [PATCH] - Bug fix (resending), libbb/dump.c:conv_u
Felipe Kellermann
stdfk at terra.com.br
Thu Jul 22 01:39:43 UTC 2004
Package: busybox
Version: resending -- v1.00-pre10 (2004.05.28-17:04+0000)
Diff-on: v1.00-rc1 (2004.07.22-00:27+0000)
Severity: bug fix
The current version of `conv_u' (libbb/dump.c:conv_u) is broken. There is
a call to printf using `*pr-cchar' referencing a string and using a single
char, when *p <= 0x1f. Bug fix attached.
--
Felipe Kellermann
-------------- next part --------------
Index: libbb/dump.c
===================================================================
RCS file: /var/cvs/busybox/libbb/dump.c,v
retrieving revision 1.12
diff -u -3 -p -b -w -u -r1.12 dump.c
--- libbb/dump.c 2 May 2004 08:38:53 -0000 1.12
+++ libbb/dump.c 22 Jul 2004 01:21:36 -0000
@@ -499,7 +499,7 @@ static void conv_u(PR * pr, u_char * p)
/* od used nl, not lf */
if (*p <= 0x1f) {
*pr->cchar = 's';
- printf(pr->fmt, list[4 * (int)(*p)]);
+ printf(pr->fmt, list + (4 * (int)*p));
} else if (*p == 0x7f) {
*pr->cchar = 's';
printf(pr->fmt, "del");
More information about the busybox
mailing list