BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001160 [BusyBox] Documentation major always 01-13-07 02:17 02-14-08 05:08
Reporter manchoz View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0001160: Broken HEX and OCT conversion in printf
Description Conversion from hexadecimal and octal ("0x" and "0" prefixes) to integer or unsigned ("%d" and "%u" arguments) do not works.

In the functions "conv_strtol()" and "conv_strtoul() in "coreutils/printf.c" "10" is passed as 'base' to bb_strtol and bb_strtoul respectively: "0" should be passed to allow hex and oct right conversion.

Patch in additional information and in attach.
Additional Information Index: coreutils/printf.c
===================================================================
--- coreutils/printf.c (revision 17263)
+++ coreutils/printf.c (working copy)
@@ -60,11 +60,11 @@
 
 static void conv_strtoul(char *arg, void *result)
 {
- *(unsigned long*)result = bb_strtoul(arg, NULL, 10);
+ *(unsigned long*)result = bb_strtoul(arg, NULL, 0);
 }
 static void conv_strtol(char *arg, void *result)
 {
- *(long*)result = bb_strtol(arg, NULL, 10);
+ *(long*)result = bb_strtol(arg, NULL, 0);
 }
 static void conv_strtod(char *arg, void *result)
 {
Attached Files  busybox-svn.printf.patch [^] (558 bytes) 01-13-07 02:17

- Relationships

- Notes
(0004664)
vda
02-14-08 05:08

Fixed sometime ago in svn. Thanks.
 

- Issue History
Date Modified Username Field Change
01-13-07 02:17 manchoz New Issue
01-13-07 02:17 manchoz Status new => assigned
01-13-07 02:17 manchoz Assigned To  => BusyBox
01-13-07 02:17 manchoz File Added: busybox-svn.printf.patch
01-18-07 03:35 manchoz Issue Monitored: manchoz
02-14-08 05:08 vda Status assigned => closed
02-14-08 05:08 vda Note Added: 0004664
02-14-08 05:08 vda Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker