Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 242916 | Differences between
and this patch

Collapse All | Expand All

(-)src/Utf8ToXML.cc~ (-4 / +4 lines)
Lines 40-50 Link Here
40
    }
40
    }
41
41
42
    void Utf8ToXML::init(const char * const toTranscode) {
42
    void Utf8ToXML::init(const char * const toTranscode) {
43
        unsigned int srcLength = std::strlen(toTranscode) + 1;
43
        XMLSize_t srcLength = std::strlen(toTranscode) + 1;
44
        // make safe assumptions on utf-16 size
44
        // make safe assumptions on utf-16 size
45
        unsigned int maxDestLength = srcLength;
45
        XMLSize_t maxDestLength = srcLength;
46
        unsigned int charsEaten;
46
        XMLSize_t charsEaten;
47
        unsigned int destLength;
47
        XMLSize_t destLength;
48
        unsigned char *charSizes = new unsigned char[maxDestLength]; // just junk
48
        unsigned char *charSizes = new unsigned char[maxDestLength]; // just junk
49
        // make a buffer - size does not matter - the object is temporary 
49
        // make a buffer - size does not matter - the object is temporary 
50
        xmlString = new XMLCh[maxDestLength];
50
        xmlString = new XMLCh[maxDestLength];
(-)src/XMLtoUtf8.cc~ (-4 / +4 lines)
Lines 27-37 Link Here
27
namespace enigma
27
namespace enigma
28
{
28
{
29
    XMLtoUtf8::XMLtoUtf8(const XMLCh* const toTranscode) {
29
    XMLtoUtf8::XMLtoUtf8(const XMLCh* const toTranscode) {
30
        unsigned int srcLength = XMLString::stringLen(toTranscode) + 1;
30
        XMLSize_t srcLength = XMLString::stringLen(toTranscode) + 1;
31
        // make safe assumptions on utf-8 size
31
        // make safe assumptions on utf-8 size
32
        unsigned int maxDestLength = 3 * srcLength;
32
        XMLSize_t maxDestLength = 3 * srcLength;
33
        unsigned int charsEaten;
33
        XMLSize_t charsEaten;
34
        unsigned int destLength;
34
        XMLSize_t destLength;
35
        // make a buffer - size does not matter - the object is temporary 
35
        // make a buffer - size does not matter - the object is temporary 
36
        utf8String = new char[maxDestLength];
36
        utf8String = new char[maxDestLength];
37
        // transcode to utf-8 -- there are no unrepresentable chars
37
        // transcode to utf-8 -- there are no unrepresentable chars

Return to bug 242916