Bug 91053 - poppler GlobalParamsWin bug/fixes
Summary: poppler GlobalParamsWin bug/fixes
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Windows (All)
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-22 09:15 UTC by Dmytro Morgun
Modified: 2015-07-16 22:30 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
GlobalParamsWin fixes (592 bytes, text/plain)
2015-06-22 09:15 UTC, Dmytro Morgun
Details
patch for poppler/GlobalParamsWin.cc (592 bytes, patch)
2015-06-22 09:20 UTC, Dmytro Morgun
Details | Splinter Review
standard unified 3 lines context diff (2.43 KB, patch)
2015-07-15 07:48 UTC, Dmytro Morgun
Details | Splinter Review

Description Dmytro Morgun 2015-06-22 09:15:42 UTC
Created attachment 116646 [details]
GlobalParamsWin fixes

While building poppler for windows there were some bugs, there are fixes.

Possibility to pass non \0 terminated string to output if the missing font name longer then static GooString length (at line 447 of the GlobalParamsWin .cc) and some memory leaks. See diff.
Comment 1 Dmytro Morgun 2015-06-22 09:20:44 UTC
Created attachment 116647 [details] [review]
patch for poppler/GlobalParamsWin.cc

Uhm, I don't really know what to write. The first one in a patch is major and can cause crash (I've encountered it). See http://cgit.freedesktop.org/poppler/poppler/tree/poppler/GlobalParamsWin.cc line 447 and compare it to http://cgit.freedesktop.org/poppler/poppler/tree/poppler/GlobalParams.cc line 1398. The latter is how it should be for windows.

The second is patch for GooString that was never freed.

The third is too a GooString that was never freed sometimes.
Comment 2 Albert Astals Cid 2015-07-02 22:18:51 UTC
Is it me or both patches are exactly the same?
Comment 3 Dmytro Morgun 2015-07-03 06:51:48 UTC
Yes, I wasn't familiar with the interface and thought that it suggested to write fixes in a comment.
Comment 4 Albert Astals Cid 2015-07-14 22:17:12 UTC
How have you created the patches?

patch complains it doesn't know what to do with them.

tsdgeos@xps:~/devel/poppler$ patch  poppler/GlobalParamsWin.cc attachment.cgi\?id\=116646 
(Stripping trailing CRs from patch; use --binary to disable.)
patching file poppler/GlobalParamsWin.cc
patch unexpectedly ends in middle of line
patch: **** unexpected end of file in patch at line 16

Can you attach the output of git diff? Or a patch file that patch actually understands?
Comment 5 Dmytro Morgun 2015-07-15 07:48:57 UTC
Created attachment 117132 [details] [review]
standard unified 3 lines context diff

The latter is non-unified (normal) diff. It is produced by winmerge, but maybe diff could do that too, I wasn't really familiar with that at that moment, sorry.

Here's the unified diff with 3 lines context, it should do. It is created by diff and taken from the working patch file.
It has a bit more lines (@@ -468,32 +471,35 @@) than previous, but it is actually just adding indentation. Well, it is (kind of) correct indentation, so I think it should be there.
Comment 6 Albert Astals Cid 2015-07-16 22:30:41 UTC
pushed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.