URL:
  <http://savannah.nongnu.org/bugs/?35093>

                 Summary: strlcat_P fails for some destinations
                 Project: AVR C Runtime Library
            Submitted by: glguy
            Submitted on: Sat 17 Dec 2011 12:31:48 AM GMT
                Category: Library
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: libc code
                  Status: None
        Percent Complete: 0%
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.7.*
           Fixed Release: None

    _______________________________________________________

Details:

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




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?35093>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
AVR-libc-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to