podofo-0.5.0

 

Initialization static members PdfTokenizer::m_whitespaceMap and
PdfTokenizer::m_delimiterMap

with this functions (genWsMap() and genDelMap()) results in memory leaks.

 

PdfTokenizer.cpp (65)

 

// Generate the whitespace character map at runtime

// so that it can be derived from the more easily

// maintainable structures in PdfDefines.h

const char * genWsMap()

{

    int   i;

    char* map = static_cast<char*>(malloc(256));

    for (i = 0; i < 256; i++)

        map[i] = '\0';

    for (i = 0; i < PoDoFo::s_nNumWhiteSpaces; ++i)

        map[PoDoFo::s_cWhiteSpaces[i]] = 1;

    return map;

}

 

Memory allocated by malloc never released.

 

 

Valeri Polskikh

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to