Closed teambob closed 9 years ago
Commented by andrewpunch on 2006-10-15 13:36 UTC Logged In: YES user_id=928005
Problem fixed for 3.1.2. Checks if stack is empty before popping.
Updated by andrewpunch on 2006-10-15 13:36 UTC
Updated by andrewpunch on 2006-11-11 23:17 UTC
Reported by edmondm on 2006-07-27 00:50 UTC Trying to run the code, was able to open the rtf document in word. But when run the linux command line, --from-rtf <filename.rtf> --to-text <filename.txt> I get segmentation fault. I tried other rtf documents, and it worked.
So I took a look at the text of the rtf document, turns out that the document didn't have matching starting { and ending }.
The code in RtfReader.cpp, does a pop of the stack. This would take a segmentation fault, if the stack is empty. I thought this would not be a valid rtf document, but apparently word doesn't care, so it is.
So I changed RtfReader.cpp to check
case '}':
if (! rtfStack->empty() ) {
//rest of the code
And that seemed to work.