[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#521443: segfaults on big-endian machines



Package: busybox
Version: 1:1.10.2-2
Severity: important
Tags: patch

Hello.

Current busybox includes a broken implementation of usage messages compressor,
which is not endian-neutral. This breaks all big-endian debian-installer images.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: powerpc (ppc64)

Kernel: Linux 2.6.26-1-powerpc64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages busybox depends on:
ii  libc6                         2.9-4      GNU C Library: Shared libraries

busybox recommends no packages.

busybox suggests no packages.

-- no debconf information
--- trunk/busybox/applets/usage_compressed	2008/08/09 17:16:40	23073
+++ trunk/busybox/applets/usage_compressed	2008/08/09 20:31:57	23074
@@ -14,14 +14,21 @@
 
 echo 'static const char packed_usage[] ALIGN1 = {'
 
-# Extra effort to avoid using "od -t x1": -t is not available
-# in non-CONFIG_DESKTOPed busybox od
+## Breaks on big-endian systems!
+## # Extra effort to avoid using "od -t x1": -t is not available
+## # in non-CONFIG_DESKTOPed busybox od
+## 
+## "$loc/usage" | bzip2 -1 | od -v -x \
+## | $SED -e 's/^[^ ]*//' \
+## | $SED -e 's/ //g' \
+## | grep -v '^$' \
+## | $SED -e 's/\(..\)\(..\)/0x\2,0x\1,/g'
 
-"$loc/usage" | bzip2 -1 | od -v -x \
+"$loc/usage" | bzip2 -1 | od -v -t x1 \
 | $SED -e 's/^[^ ]*//' \
 | $SED -e 's/ //g' \
 | grep -v '^$' \
-| $SED -e 's/\(..\)\(..\)/0x\2,0x\1,/g'
+| $SED -e 's/\(..\)/0x\1,/g'
 
 echo '};'
 echo '#define SIZEOF_usage_messages' `expr 0 + $sz`

Reply to: