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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #35093: strlcat_P fails for some destinations

Submitter:  Eric Mertens <glguy>
Submitted:  Sat 17 Dec 2011 12:31:48 AM UTC
   
 
Category:  Library Severity:  3 - Normal
Priority:  5 - Normal Item Group:  libc code
Status:  Fixed Assigned to:  dmix
Percent Complete:  100% Open/Closed:  Closed
Release:  1.7.* Fixed Release:  None

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

Thanks!

Dmitry Xmelkov <dmix>
Group administrator
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.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-12-24 dmix StatusConfirmed Fixed
        Percent Complete0% 100%
        Open/ClosedOpen Closed
    2011-12-17 dmix StatusNone Confirmed
        Assigned toNone dmix

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code