| Anonymous | Login | Signup for a new account | 11-10-2008 11:10 PST |
| Main | My View | View Issues | Change Log | Docs |
| 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 |
|
||||||||
|
|
|||||||||
| Copyright © 2000 - 2006 Mantis Group |