BusyBox 1.3.0 ar/dpkg is broken

Denis Vlasenko vda.linux at googlemail.com
Thu Dec 14 23:08:39 UTC 2006


On Thursday 14 December 2006 15:16, Kim B. Heino wrote:
> Hello,
> 
> The new xstrtoul() and xatou() functions broke ar and dpkg commands in 
> BusyBox 1.3.0:
> 
> dpkg: invalid number '100644  4 <binary garbage removed>
> 
> This is because get_header_ar() function is passing the binary header:
> 
>          typed->mode = xstrtoul(ar.formatted.mode, 8);
>          typed->mtime = xatou(ar.formatted.date);
> ...
>          typed->size = xatoul(ar.formatted.size);
> 
> One way to fix this is to add strtoul's endptr parameter to xstrtoul() 
> too. Another way is to use some other functions in get_header_ar() to 
> parse header.

bb_strtoXX. 

> Any suggestions?

Does this patch work better?
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox-1.3.0.dpkg_ar.patch
Type: text/x-diff
Size: 1129 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20061215/4b5f9699/attachment-0002.bin 


More information about the busybox mailing list