Commit 1ab32e47 authored by IOhannes m zmölnig's avatar IOhannes m zmölnig
Browse files

fix bad memory access

Thanks: Albert Gräf for finding this.
parent ecbd36f3
......@@ -185,8 +185,10 @@ bool RTE::addSearchPath(const std::string&path, void* ctx)
const char *inptr = path.c_str();
char encoded[MAXPDSTRING];
char*outptr = encoded;
if(!inptr) /* nothing to add */
return false;
while(inptr && ((outptr+2) < (encoded+MAXPDSTRING))) {
while(*inptr && ((outptr+2) < (encoded+MAXPDSTRING))) {
*outptr++ = *inptr++;
if ('+'==inptr[-1]) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment