bb-1.13 modutils-24.c

David N. Lombard dnlombar at ichips.intel.com
Tue Jan 27 14:28:50 UTC 2009


On Mon, Jan 26, 2009 at 01:16:17PM -0800, Harald Küthe wrote:
> Hello,
> 
> this patch below hasn't made it to the source yet.
> Without it insmod causes memory corruption of the sec->contents vector
> as reported in nov 08.
> 
>  >*** glibc detected *** malloc(): memory corruption (fast): 0x10067fc0
> ***
>  >Aborted
> 
>  >insmod: init_module: dbox2_fp: Device or resource
> busy
>  >insmod: cannot insert '/lib/modules/2.4.36.6-dbox2/misc/dbox2_fp.o':
> Operation not permitted
> 
> 
> diff -ur busybox-1.13.2.orig/modutils/modutils-24.c
> busybox-1.13.2/modutils/modutils-24.c
> --- busybox-1.13.2.orig/modutils/modutils-24.c    2008-11-29
> 07:48:56.000000000 +0100
> +++ busybox-1.13.2/modutils/modutils-24.c    2009-01-26
> 21:34:41.000000000 +0100
> @@ -997,8 +997,9 @@
> 
>          case R_68K_PC8:
>              v -= dot;
> -            if ((ElfW(Sword))v > 0x7f ||
> -                    (ElfW(Sword))v < -(ElfW(Sword))0x80) {
> +            if ((ElfW(Sword))v > 0x7f
> +             || (ElfW(Sword))v < -(ElfW(Sword))0x80
> +            ) {

There's a lot of gratuitous reformatting througout this patch!

-- 
David N. Lombard, Intel, Irvine, CA
I do not speak for Intel Corporation; all comments are strictly my own.


More information about the busybox mailing list