Bug 255 - printf() field width limit is unacceptable
Summary: printf() field width limit is unacceptable
Status: RESOLVED FIXED
Alias: None
Product: uClibc
Classification: Unclassified
Component: stdio (show other bugs)
Version: 0.9.30.1
Hardware: PC Linux
: P5 normal
Target Milestone: 0.9.31
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-31 05:18 UTC by Michael Deutschmann
Modified: 2010-03-17 15:47 UTC (History)
1 user (show)

See Also:
Host: i386-pc-linux-uclibc
Target: i386-pc-linux-uclibc
Build: i386-pc-linux-uclibc


Attachments
Patch to remove stdio field width cap (863 bytes, patch)
2009-03-31 05:18 UTC, Michael Deutschmann
Details
aforementioned widthtest.c (2.73 KB, text/plain)
2009-07-21 17:38 UTC, Bernhard Reutner-Fischer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Deutschmann 2009-03-31 05:18:34 UTC
Created attachment 219 [details]
Patch to remove stdio field width cap

uClibc mishandles printf field width limits larger than 40959, as a result of misguided overflow-protection code.  This causes spurious test failures with GNU coreutils, which depends on "%65536s" and "%20000000f" working according to spec.

I'm including a simple patch to fix the problem, extending the limit to INT_MAX.

When I reported this earlier in the old bug-tracking system, I was asked for a test program.  I've posted one on:

ftp://ftp.ocis.net/pub/users/ldeutsch/uCpatches/widthtest.c
Comment 1 Bernhard Reutner-Fischer 2009-07-21 17:38:37 UTC
Created attachment 489 [details]
aforementioned widthtest.c
Comment 2 Bernhard Reutner-Fischer 2010-03-17 15:47:58 UTC
applied as 266aaaf46e136d63532a797fd8604e30d4350443
Thanks!