[Bug 21573] New: Need heap overrun detection at beginning of buffers, too
wine-bugs at winehq.org
wine-bugs at winehq.org
Mon Feb 1 17:04:48 CST 2010
http://bugs.winehq.org/show_bug.cgi?id=21573
Summary: Need heap overrun detection at beginning of buffers,
too
Product: Wine
Version: 1.1.37
Platform: x86
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P2
Component: ntdll
AssignedTo: wine-bugs at winehq.org
ReportedBy: dank at kegel.com
On Linux, valgrind gives nice warnings when you access before
the first byte. It'd be nice if valgrinding Windows apps under Wine
gave the same warnings. For instance, the following program should
give three warnings under valgrind+wine just as it does under valgrind:
#include <stdio.h>
#include <stdlib.h>
int badness_before_n_after ( char* p )
{
return p[-1] + p[10];
}
int main ( void )
{
char* p = malloc(10);
int who_knows = badness_before_n_after(p);
// expect 2 x invalid address yelpage
who_knows += p[5];
if (who_knows == 42)
printf("It's 42 (!)\n");
else
printf("It's not 42 (dull but unsurprising)\n");
free(p);
return 0;
}
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the wine-bugs
mailing list