Summary: | glibc corrupts memory on malloc | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | idiotbg |
Component: | [OLD] Core system | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
Status: | RESOLVED INVALID | ||
Severity: | critical | CC: | SebastianLuther |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
idiotbg
2009-11-16 16:56:05 UTC
> lattice = (lattice_point*)malloc(sizeof(uint8_t) * (x+1) * (y+1));
is wrong, lattice is of type uint16_t. In your example you are requesting 6*6=36 bytes and lattice[20] points to the bytes after the requested memory region.
ah, fuck, thanks. Sorry for waisting your time, I obviously need some sleep. |