We're updating the issue view to help you get more done. 

genccode crashes when creating assembly files

Description

In writeAssemblyCode within pkg_genc.cpp I'm encountering a crash during the file read.

for(i=0; i < (length % sizeof(uint32_t)); ++i) {
buffer[length+i] = 0;
}

The value of length is in bytes but the buffer is declared as uint32_t buffer[1024]. If length is greater than 1024 then the buffer is accessed incorrectly.

I encountered this when trying to cross compile on Windows for a different platform.

Environment

Status

Assignee

Steven R. Loomis

Reporter

Don Olmstead

Components

Fix versions

Priority

major