| Summary: | xpdf is not updated with latest sources | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Darrell <darrella> |
| Component: | tdegraphics | Assignee: | Timothy Pearson <kb9vqf> |
| Status: | NEW --- | ||
| Severity: | normal | CC: | bugwatch, darrella, mutantturkey, slavek.banko |
| Priority: | P1 | ||
| Version: | R14.0.x [Trinity] | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
| Bug Depends on: | |||
| Bug Blocks: | 2968 | ||
| Attachments: |
Gentoo kpdf/xpdf patch from 2009
xpdf patch xpdf-3.02pl4.patch xpdf-3.02pl5.patch xpdf-errCodes proposed patch |
||
|
Description
Darrell
2012-08-17 15:23:40 CDT
Created attachment 787 [details]
Gentoo kpdf/xpdf patch from 2009
Adding a patch from Gentoo kde-sunset which, while not quite up to the current version of xpdf, appears to contain some security fixes. If the xpdf code in the Trinity tree hasn't been altered (why would it have been?), this should apply as-is. Now we just need changes that took place between xpdf 3.02p14 and 3.03
Yesterday I tinkered with the xpdf patches from Slackware. Some merged and some did not. Of those that did not, I need to review the source code of the GIT version of xpdf and the original upstream 3.02. I know that at least one of the patches failed because the GIT version was already patched. Things got confusing as the night wore on and I got tired. Then I realized the GIT version of xpdf is code for the rendering engine only and not the full xpdf package. I'll hack at this some more and post a final patch for testing. I looked at the 3.03 sources and although only a minor version bump, there sure seems to be a lot different. I'll work on 3.02 patches for the GIT sources. Updating the GIT sources to 3.03 will require effort to prune the code to the rendering engine only, not to mention lots of testing both with compiling and usability testing. Created attachment 788 [details]
xpdf patch
Created attachment 789 [details]
xpdf-3.02pl4.patch
Created attachment 790 [details]
xpdf-3.02pl5.patch
This did not turn out too bad. Looks like patches xpdf-3.02pl1 -> xpdf-3.02pl3 have been applied to the GIT version. I have attached three upstream patches: xpdf-resizefix.diff xpdf-3.02pl4.patch xpdf-3.02pl5.patch There were no build failures. Preliminary usability testing shows no problems either, but somebody who actually understands the code in the patches would know exactly what to test. I have not looked into updating the GIT sources to xpdf 3.03. If somebody else would test these patches and there are no problems, then that would be sufficient to close this bug report after pushing to GIT. Although updating to xpdf 3.03 is not strictly required to close this bug report, updating to that version would be nice because xpdf 3.03 supports PDF 1.7. xpdf-3.03 sources: ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.03.tar.gz Correct me if I am wrong, but shouldn't the update be as simple as copy+pasting the new source files over the old ones? If you are referring to the 3.03 code, been there done that. Build failures in kpdf/core/generator_pdf. I tested in v3.5.13-sru kpdf with patches: + xpdf-resizefix.diff + xpdf-3.02pl4.patch + xpdf-3.02pl5.patch ...and I did not find any problems. I recommend that we push the patches to GIT, but rename this bug report to "xpdf is not updated with latest sources" and leave it open as a to-do normal priority bug. Patches pushed to GIT in commit 561d1d68. Bug report bumped to Normal and the Summary edited to update the xpdf sources. Only now I realize: splashErrZeroImage and splashErrBadArg has the same error code == returned code can not be distinguished. I do not know who splashErrZeroImage added, but if not exists in the original xpdf, should be relegated to the end and the number increased to 10. The original unpatched xpdf 3.02 does not have splashErrZeroImage or splashErrBadArg. 3.5.10 -> 3.5.13 tdegraphics/kpdf/xpdf/splash/SplashErrorCodes.h has splashErrZeroImage. Patch xpdf-3.02pl4.patch added splashErrBadArg but the patch does not match the expected code. I don't know how the patch merged. Weird. I presume all error codes should be different? In that case changing splashErrBadArg to 10 would make sense. Created attachment 794 [details]
xpdf-errCodes proposed patch
I propose to move TDE specific error code bellow to the original xpdf error codes.
Looks sane to me, but I'm not a C/C++ programmer. I looked at the source code xpdf 3.03, that does not contain splashErrZeroImage, but neither splashErrBadArg. There is no need to change their order - just splashErrBadArg increase to 10. Because this change can not interfere with the function, so I'll do it. Comment on attachment 794 [details]
xpdf-errCodes proposed patch
Error codes numbers fixed in GIT hash 809db41f
The previous patches were all committed some time ago. All that remains with this report is updating to the 3.03 sources. |