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 stdio/14286] Integer overflow in computing allocation size in vfwprintf %s handling


http://sourceware.org/bugzilla/show_bug.cgi?id=14286

--- Comment #1 from Rich Felker <bugdal at aerifal dot cx> 2012-06-24 03:48:25 UTC ---
Created attachment 6476
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6476
test case

Ideally, this program should print -1 after the first wprintf fails with
EILSEQ, possibly after printing "hello world". Or if it fails due to memory
exhaustion, it should print -1 with errno set to ENOMEM.

Instead (on 32-bit machines) it simply prints "h\n" followed by a 2 (the return
value of the first wprintf).

Apologies that the test program is not the best-tuned to demonstrate the bug. I
designed it from a standpoint of wanting to see if the bug caused exploitable
memory corruption, rather than best demonstrating the non-exploitable problem.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]