bugAVR C Runtime Library - Bugs: bug #5976, Things missing from docs in...

 
 

bug #5976: Things missing from docs in avr-libc

Submitted by:  russell shaw <rj2000>
Submitted on:  Wed 15 Oct 2003 04:20:59 AM UTC  
 
Category: DocumentationSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPercent Complete: 0%
Assigned to: Theodore A. Roth <troth>Open/Closed: Closed
Release: NoneFixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 18 Oct 2003 08:25:57 PM UTC, comment #1:

Actually, the length of the buffer depends on the value of the radix. I've added the following to the dox itoa and related functions (both HEAD and 1.0 branch):

Note:

The minimal size of the buffer s depends on the choice of radix. For example, if the radix is 2 (binary), you need to supply a buffer with a minimal length of 8 * sizeof (long int) + 1 characters, i.e. one character for each bit plus one for the string terminator. Using a larger radix will require a smaller minimal buffer size.

Warning:

If the buffer is too small, you risk a buffer overflow.

Theodore A. Roth <troth>In charge of this item.
Wed 15 Oct 2003 04:20:59 AM UTC, original submission:

__lpm_inline is in the avr-libc FAQ (Why do all my "foo...bar" strings eat up the SRAM?), but is not in the "MODULES" section anywhere i've noticed.

itoa() and related docs don't say how long a string should be to prevent a memory over-run. I'd guess 7 (-32767\0).

russell shaw <rj2000>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 18 Oct 2003 08:25:57 PM UTCtrothStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)
Fri 17 Oct 2003 05:21:14 PM UTCtrothAssigned toNone=>NA

Back to the top


Powered by Savane 3.1-cleanup1