Bug 91053

Summary: poppler GlobalParamsWin bug/fixes
Product: poppler Reporter: Dmytro Morgun <lztoad>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: lztoad
Version: unspecified   
Hardware: Other   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: GlobalParamsWin fixes
patch for poppler/GlobalParamsWin.cc
standard unified 3 lines context diff

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.