bugAVR C Runtime Library - Bugs: bug #35093, strlcat_P fails for some...

 
 

bug #35093: strlcat_P fails for some destinations

Submitted by:  Eric Mertens <glguy>
Submitted on:  Sat 17 Dec 2011 12:31:48 AM UTC  
 
Category: LibrarySeverity: 3 - Normal
Priority: 5 - NormalItem Group: libc code
Status: FixedPercent Complete: 100%
Assigned to: Dmitry Xmelkov <dmix>Open/Closed: Closed
Release: 1.7.*Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sat 17 Dec 2011 07:00:19 AM UTC, comment #2:

Thanks!

Dmitry Xmelkov <dmix>
Project AdministratorIn charge of this item.
Sat 17 Dec 2011 12:38:17 AM UTC, comment #1:

The same behavior exists in strlcat.S as well.

Eric Mertens <glguy>
Sat 17 Dec 2011 12:31:48 AM UTC, original submission:

In 2009 the strlcat_P function treats the X register as an 8-bit instead of 16-bit register in one case which will cause a failure when the null terminator in the destination string is at the end of a 256-byte aligned region of memory.

This file can be found in libc/pmstring/strlcat_P.S

--- strlcat_P.S.old 2011-12-16 16:20:59.000000000 -0800
+++ strlcat_P.S 2011-12-16 16:21:10.000000000 -0800
@@ -99,7 +99,7 @@
ld _tmp_reg_, X+
tst _tmp_reg_
brne 1b
- subi XL, 1
+ sbiw XL, 1
rjmp 3f

; copy loop

Eric Mertens <glguy>

 

(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

 

Carbon-Copy List
  • -unavailable- added by dmix (Posted a comment)
  • -unavailable- added by glguy (Submitted the item)
  •  

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

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 24 Dec 2011 01:02:10 AM UTCdmixStatusConfirmed=>Fixed
      Percent Complete0%=>100%
      Open/ClosedOpen=>Closed
    Sat 17 Dec 2011 07:00:19 AM UTCdmixStatusNone=>Confirmed
      Assigned toNone=>dmix

    Back to the top


    Powered by Savane 3.1-cleanup1