[BusyBox] segfault in hexdump

Steven Scholz steven.scholz at imc-berlin.de
Sun Dec 8 06:38:05 UTC 2002


I wrote:

> When I invoke '/bin/hexdump' I get a "Segmentation fault".
> 
> ~ # echo hello > foo
> ~ # cat foo
> hello
> ~ # hexdump foo
> hexdump_main: parsing argc...
> hexdump_main: calling dump()...
> Segmentation fault
> 
> The segfault appears to be in dump()!

The current CVS version is working! No seg fault anymore.

But instead I see a strange output:

~ # cat foo
HELLO
WORLD
~ # 

Instead of 

scholz at pinguin:~/Temp> hexdump foo
0000000 4548 4c4c 0a4f 4f57 4c52 0a44          
000000c

I see

~ # hexdump foo
0000000 4845 4c4c 4f0a 574f 524c 440a          
101612e8

!?!?

The last address printed is wrong!

A different file shows

/opt/imc # cat production.dat 
FLASH_PROD_JAHR=2002
FLASH_TYPE_UMUSY=25
FLASH_TYPE_INTERFACE=5

/opt/imc # hexdump production.dat 
30016010 464c 4153 485f 5052 4f44 5f4a 4148 523d
101612e8 3230 3032 0a46 4c41 5348 5f54 5950 455f
10161300 554d 5553 593d 3235 0a46 4c41 5348 5f54
101612e8 5950 455f 494e 5445 5246 4143 453d 350a
0000000 0a00                                   
101612e8

So here the printed addresses appear to be completly wrong...

Does someone sees the same?

Thanks, 

Steven



More information about the busybox mailing list