Fixed possible buffer overflow
SVN revision: 1978
This commit is contained in:
1 parent
9ffc0f41d4
commit
15ff5f3ae0
1 file changed
+4
-2
+4
-2
@@ -265,8 +265,10 @@ void convert_crlf(char *buffer, int bufsize)
|
||||
p = buffer;
|
||||
while ((p = strstr(p, "\\n")) != NULL) {
|
||||
|
||||
*(p++) = '\r';
|
||||
*(p++) = '\n';
|
||||
if ((int)p - (int)buffer < bufsize-2) {
|
||||
*(p++) = '\r';
|
||||
*(p++) = '\n';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user