Bug 618178 - Xerces-C can not deal with GBK file
Summary: Xerces-C can not deal with GBK file
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: xerces-c   
(Show other bugs)
Version: el5
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Xavier Bachelot
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2010-07-26 10:54 UTC by Kirby Zhou
Modified: 2017-04-06 10:34 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-04-06 10:34:33 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
The sample data (92.18 KB, application/x-gzip-compressed)
2010-07-26 10:54 UTC, Kirby Zhou
no flags Details

Description Kirby Zhou 2010-07-26 10:54:28 UTC
Created attachment 434382 [details]
The sample data

Description of problem:

Xerces-C can not deal with GBK file

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:

Compare the SAXPrint sample , and pass the attached xml to it.

Actual results:


Expected results:

Additional info:

Please rebuild the xerces with IconvGNU or ICU, and check the following code for potential bug.


     UErrorCode  err = U_ZERO_ERROR;
         , &startTarget
         , startTarget + maxChars
         , (const char**)&startSrc
         , (const char*)endSrc
         , (fFixed ? 0 : (int32_t*)fSrcOffsets)
         , false
         , &err

There seems need a mute to protect fConverter.
ICULCPTranscoder::calcRequiredSize called ' XMLMutexLock
lockConverter(&fMutex); ' to do it.


     for (size_t cnt = 0; cnt < maxChars && srcLen; cnt++) {
         size_t    rc = iconvFrom(startSrc, &srcLen, &orgTarget, uChSize());
         if (rc == (size_t)-1) {
             if (errno != E2BIG || prevSrcLen == srcLen) {
                 ThrowXMLwithMemMgr(TranscodingException, XMLExcepts::Trans_BadSrcSeq, getMemoryManager());
         charSizes[cnt] = prevSrcLen - srcLen;
         prevSrcLen = srcLen;

It do not deal with errno==EINVAL, which will happen when it is called by
XMLReader::refreshCharBuffer with an incomplete MBCS character.
I mean, one half is in buffer, and the other half is left on disk.

Comment 3 Volker Fröhlich 2014-04-26 19:19:45 UTC
I don't have commit access to EL5. As I understand it, the EPEL5 version should be retired, but the retirement process was not executed:


Comment 4 Fedora End Of Life 2017-04-06 10:34:33 UTC
Fedora EPEL 5 changed to end-of-life (EOL) status on 2017-03-31. Fedora EPEL 5
is no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora
or Fedora EPEL, please feel free to reopen this bug against that version. If
you are unable to reopen this bug, please file a new report against the current
release. If you experience problems, please add a comment to this bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.