fixed possible overflow cases

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40657
This commit is contained in:
Borja Ferrer
2007-03-19 19:19:41 +00:00
parent 1ced2210ed
commit 862f25b223
4 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -305,7 +305,7 @@ size_t LibrarySystem::PathFormat(char *buffer, size_t len, const char *fmt, ...)
size_t mylen = vsnprintf(buffer, len, fmt, ap);
va_end(ap);
mylen = (mylen >= len) ? (len - 1) : mylen;
mylen = (mylen >= len) ? len : mylen;
for (size_t i=0; i<mylen; i++)
{