mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Fixed buffer overflow in CodesToHeader, now dsptool -m creates files correctly as far as I could test
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3484 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
697ce7b1ab
commit
a536460067
@ -150,7 +150,7 @@ void CodeToHeader(const std::vector<u16> &code, std::string _filename,
|
||||
void CodesToHeader(const std::vector<u16> *codes, const std::vector<std::string>* filenames,
|
||||
int numCodes, const char *name, std::string &header)
|
||||
{
|
||||
char buffer[1024];
|
||||
char buffer[0x1000];
|
||||
int reserveSize = 0;
|
||||
for(int i = 0; i < numCodes; i++)
|
||||
reserveSize += (int)codes[i].size();
|
||||
@ -165,7 +165,6 @@ void CodesToHeader(const std::vector<u16> *codes, const std::vector<std::string>
|
||||
{
|
||||
std::string filename;
|
||||
SplitPath(filenames->at(i), NULL, &filename, NULL);
|
||||
// printf("files %s\n", (filenames->at(i).c_str()));
|
||||
sprintf(buffer, "%s\t\"%s\",\n", buffer, filename.c_str());
|
||||
}
|
||||
sprintf(buffer, "%s};\n\n", buffer);
|
||||
|
Loading…
Reference in New Issue
Block a user