Bug 618178 - Xerces-C can not deal with GBK file
Xerces-C can not deal with GBK file
Status: CLOSED EOL
Product: Fedora EPEL
Classification: Fedora
Component: xerces-c (Show other bugs)
el5
All Linux
low Severity medium
: ---
: ---
Assigned To: Xavier Bachelot
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-26 06:54 EDT by Kirby Zhou
Modified: 2017-04-06 06:34 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-04-06 06:34:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 06:54 EDT, Kirby Zhou
no flags Details

  None (edit)
Description Kirby Zhou 2010-07-26 06:54:28 EDT
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):

2.7.0-9

How reproducible:

100%

Steps to Reproduce:

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

Actual results:

Failure

Expected results:


Additional info:

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


ICUTranscoder::transcodeFrom 

     UErrorCode  err = U_ZERO_ERROR;
     ucnv_toUnicode
     (
         fConverter
         , &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.


IconvGNUTranscoder::transcodeFrom

     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 15:19:45 EDT
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:

https://fedoraproject.org/wiki/How_to_remove_a_package_at_end_of_life
https://admin.fedoraproject.org/pkgdb/acls/name/xerces-c
Comment 4 Fedora End Of Life 2017-04-06 06:34:33 EDT
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.