[Bug 1089722] Re: wcslen reads beyond the end of the buffer

Andreas W Wylach aw at ioc3.de
Wed Feb 20 03:42:56 UTC 2013


I can confirm this bug. I already posted a question on stackoverflow a
few weeks ago (stackoverflow.com/questions/14474691/wifstream-with-
imbue-locale-produces-valgrind-errors) before I did deeper
investigation. In my current project I work with wstring/wchar_t and
also locale / imbue and valgrind reports errors as stated above.

Using Ubuntu 12.04 LTS

- libc6:
  Installed: 2.15-0ubuntu10.3
  Candidate: 2.15-0ubuntu10.3
  Version table:
 *** 2.15-0ubuntu10.3 0
        500 http://mo.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.15-0ubuntu10.2 0
        500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
     2.15-0ubuntu10 0
        500 http://mo.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

$ /lib/x86_64-linux-gnu/libc.so.6
GNU C Library (Ubuntu EGLIBC 2.15-0ubuntu10.3) stable release version 2.15, by Roland McGrath et al.
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.6.3.
Compiled on a Linux 3.2.30 system on 2012-10-05.
Available extensions:
	crypt add-on version 2.1 by Michael Glad and others
	GNU Libidn by Simon Josefsson
	Native POSIX Threads Library by Ulrich Drepper et al
	BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to valgrind in Ubuntu.
https://bugs.launchpad.net/bugs/1089722

Title:
  wcslen reads beyond the end of the buffer

Status in “valgrind” package in Ubuntu:
  Triaged

Bug description:
  valgrind reports many errors of wcslen reading beyond the end of the
  buffer.  It appears that sysdeps/x86_64/wcslen.S tries do do 64 bit
  reads which can result in reading beyond the end of the buffer if
  there are less than 64 bits left.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/valgrind/+bug/1089722/+subscriptions




More information about the foundations-bugs mailing list