This commit is contained in:
Kovid Goyal 2012-09-02 18:06:19 +05:30
parent 94b192b134
commit ae73428839

View File

@ -40,7 +40,7 @@ class OutputDevice : public PdfOutputDevice {
char *buf;
int res, len=1024;
while(true) {
buf = new (std::nothrow) char[len];
buf = new (std::nothrow) char[len+1];
if (buf == NULL) { PyErr_NoMemory(); throw pyerr(); }
res = vsnprintf(buf, len, pszFormat, args);
delete[] buf;