This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug string/19390] Integer overflow in strncat


https://sourceware.org/bugzilla/show_bug.cgi?id=19390

cvs268 <cvs268 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cvs268 at gmail dot com

--- Comment #2 from cvs268 <cvs268 at gmail dot com> ---
Tried the sample-code on ARM (Cortex A9) running Ubuntu 12.04.

gcc 4.6.3 complained about missing  stdalign.h.

So had to replace alignas(64) char s[144];
with __attribute__ ((aligned (64))) char s[144];
(hopefully the replacement works as intended.)

gcc test-strncat.c -std=c99 -o test-strncat

gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

file test-strncat
test-strncat: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically
linked (uses shared libs), for GNU/Linux 2.6.31,
BuildID[sha1]=0xb88137c1de1a1f534311ba81b1f403166b1091f1, not stripped

./test-strncat 
before:
01111111111111111111111111111111111111111111111111...
after:
22222222222222222222222222222222201111111111111111...
the string should end here       ^

So works properly, no issues, right?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]