| Anonymous | Login | Signup for a new account | 2010-09-03 08:46 UTC |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
| ID | Category | Severity | Type | Date Submitted | Last Update | ||||||||
| 0000174 | [1003.1(2008)/Issue 7] System Interfaces | Objection | Enhancement Request | 2009-10-29 18:21 | 2009-11-12 16:39 | ||||||||
| Reporter | drepper | View Status | public | ||||||||||
| Assigned To | ajosey | ||||||||||||
| Priority | normal | Resolution | Accepted As Marked | ||||||||||
| Status | Resolved | ||||||||||||
| Name | Ulrich Drepper | ||||||||||||
| Organization | Red Hat, Inc. | ||||||||||||
| User Reference | ud-puts-overflow | ||||||||||||
| Section | puts() | ||||||||||||
| Page Number | 1723 | ||||||||||||
| Line Number | 55058 | ||||||||||||
| Interp Status | --- | ||||||||||||
| Final Accepted Text | Note: 0000298 | ||||||||||||
| Summary | 0000174: puts for strings longer than INT_MAX | ||||||||||||
| Description |
Strings do not have a length limit and on systems with, say, 64-bit address space and int being 32-bit, the result of calls to puts with strings as parameter of length > INT_MAX is unspecified. We cannot return the number of written bytes because all successful calls must return a non-negative value. The same applies to fputs. |
||||||||||||
| Desired Action |
There are two ways out: - forbid such calls outright. In this case: 1. copy the ERRORS section for fputc to puts() and fputs(). 2. add new error case [EOVERFLOW] The string /s/ is too long. - truncate the write at INT_MAX characters and have the app handle this. |
||||||||||||
| Tags | c99, tc1-2008 | ||||||||||||
| Attached Files | |||||||||||||
|
|
|||||||||||||
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2009-10-29 18:21 | drepper | New Issue | |
| 2009-10-29 18:21 | drepper | Status | New => Under Review |
| 2009-10-29 18:21 | drepper | Assigned To | => ajosey |
| 2009-10-29 18:21 | drepper | Name | => Ulrich Drepper |
| 2009-10-29 18:21 | drepper | Organization | => Red Hat, Inc. |
| 2009-10-29 18:21 | drepper | User Reference | => ud-puts-overflow |
| 2009-10-29 18:21 | drepper | Section | => puts() |
| 2009-10-29 18:21 | drepper | Page Number | => 1723 |
| 2009-10-29 18:21 | drepper | Line Number | => 55058 |
| 2009-10-29 18:30 | nick | Tag Attached: c99 | |
| 2009-10-29 18:32 | nick | Note Added: 0000271 | |
| 2009-10-29 21:09 | cmsmith | Note Added: 0000272 | |
| 2009-10-29 22:58 | drepper | Note Added: 0000273 | |
| 2009-10-30 09:51 | geoffclare | Note Added: 0000274 | |
| 2009-11-12 16:38 | msbrown | Interp Status | => --- |
| 2009-11-12 16:38 | msbrown | Note Added: 0000298 | |
| 2009-11-12 16:38 | msbrown | Status | Under Review => Resolved |
| 2009-11-12 16:38 | msbrown | Resolution | Open => Accepted As Marked |
| 2009-11-12 16:39 | msbrown | Final Accepted Text | => Note: 0000298 |
| 2010-08-27 13:05 | ajosey | Tag Attached: tc1-2008 | |
| Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |