Skip to content

Commit

Permalink
fix array access out of bounds
Browse files Browse the repository at this point in the history
static variable buf does not allow reentrance here (would be better put on stack = not static)

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@11091 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Henning Kiel committed Feb 13, 2012
1 parent 2bdf3ac commit e1689be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Compiler/runtime/System_omc.cpp
Expand Up @@ -680,7 +680,7 @@ extern const char* System_snprintff(const char *fmt, int len, double d)
static char buf[1024];
assert(1024>len);
snprintf(buf,len,fmt,d);
buf[1024] = 0;
buf[1023] = 0;
}

}

0 comments on commit e1689be

Please sign in to comment.