summaryrefslogtreecommitdiff
path: root/Source/Core/DSPCore/Src/DSPCodeUtil.cpp
diff options
context:
space:
mode:
authornakeee <nakeee@gmail.com>2009-06-17 22:16:48 +0000
committernakeee <nakeee@gmail.com>2009-06-17 22:16:48 +0000
commita5364600673c7a5aa5f398d8938ea76d398ec990 (patch)
tree893967a202825db87e446810fe87244b62ab4afe /Source/Core/DSPCore/Src/DSPCodeUtil.cpp
parent697ce7b1ab2ffc5f1bf18bf9bfc37462fcb38183 (diff)
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
Diffstat (limited to 'Source/Core/DSPCore/Src/DSPCodeUtil.cpp')
-rw-r--r--Source/Core/DSPCore/Src/DSPCodeUtil.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/Core/DSPCore/Src/DSPCodeUtil.cpp b/Source/Core/DSPCore/Src/DSPCodeUtil.cpp
index e41866e414..709ecfc095 100644
--- a/Source/Core/DSPCore/Src/DSPCodeUtil.cpp
+++ b/Source/Core/DSPCore/Src/DSPCodeUtil.cpp
@@ -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);