Hi Maruan,
> Maruan Sahyoun <[email protected]> hat am 6. Dezember 2013 um 09:00 > geschrieben: > > > Hi Andreas, > > committed in rev 1548394 might have been a network issue. Thanks for fixing it that fast! > Thanks for picking up my fault. That's one of the advantages of the transparency within ASF projects. :-) I hope that everybody is looking at my checkins as well so that my faults will be found too in that early stage. :-) > Maruan Sahyoun BR Andreas Lehmkühler > Am 06.12.2013 um 08:58 schrieb Andreas Lehmkühler <[email protected]>: > > > Hi, > > > >> Maruan Sahyoun <[email protected]> hat am 6. Dezember 2013 um 08:54 > >> geschrieben: > >> > >> > >> Hi Andreas, > >> > >> of course it should - too early in the morning for me :-) > >> > >> Unfortunately it doesn't let me commit the fix - could you try? > > Hmm, what's the problem , any svn issue? > > > > I can't commit it as I'm not a home. > > > >> Maruan Sahyoun > >> > >> Am 06.12.2013 um 08:43 schrieb Andreas Lehmkühler <[email protected]>: > >> > >>> Hi, > >>> > >>>> [email protected] hat am 6. Dezember 2013 um 08:15 geschrieben: > >>>> > >>>> > >>>> Author: msahyoun > >>>> Date: Fri Dec 6 07:15:36 2013 > >>>> New Revision: 1548387 > >>>> > >>>> URL: http://svn.apache.org/r1548387 > >>>> Log: > >>>> Fix for infinite loop in parseCOSHexString [PDFBOX-1796] > >>>> > >>>> Modified: > >>>> > >>>> > >>>> pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java > >>>> > >>>> Modified: > >>>> pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java > >>>> URL: > >>>> http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java?rev=1548387&r1=1548386&r2=1548387&view=diff > >>>> ============================================================================== > >>>> --- > >>>> pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java > >>>> (original) > >>>> +++ > >>>> pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java > >>>> Fri Dec 6 07:15:36 2013 > >>>> @@ -1008,7 +1008,15 @@ public abstract class BaseParser > >>>> do > >>>> { > >>>> c = pdfSource.read(); > >>>> - } while ( c != '>' ); > >>>> + } while ( c != '>' && c < 0 ); > >>> I guess there is a typo? It should be the following, shouldn't it? > >>> > >>> } while ( c != '>' && c >= 0 ); > >>> > >>>> + > >>>> + // might have reached EOF while looking for the closing > >>>> bracket > >>>> + // this can happen for malformed PDFs only. Make sure > >>>> that > >>>> there is > >>>> + // no endless loop. > >>>> + if ( c < 0 ) > >>>> + { > >>>> + throw new IOException( "Missing closing bracket for > >>>> hex > >>>> string. Reached EOS." ); > >>>> + } > >>>> > >>>> // exit loop > >>>> break; > >>> > >>> > >>> BR > >>> Andreas Lehmkühler > >> > > > > BR > > Andreas Lehmkühler >
