avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] [bug #35093] strlcat_P fails for some destinations


From: Eric Mertens
Subject: [avr-libc-dev] [bug #35093] strlcat_P fails for some destinations
Date: Sat, 17 Dec 2011 00:31:49 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]