FILE vs int API mismatch in JarFile class

Bug #1345930 reported by Pino Toscano on 2014-07-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Unassigned

Bug Description

In the open() and close() methods of the JarFile (src/io/inkjar.*) class, there's a an API mismatch usage. That is, there's fopen being used as it is was open, and fd checked as if it was a file descriptor and not a FILE*.

While this might still compile (albeit with compiler warnings, at least with GCC), it won't work at all at runtime.

Attached it is a fix for this issue, produced on top of inkscape 0.48.5.

Related branches

Pino Toscano (pinotree) wrote :
su_v (suv-lp) wrote :

> Attached it is a fix for this issue, produced on top
> of inkscape 0.48.5.

There are currently no more bug-fix releases planned for the stable release branch <lp:inkscape/0.48.x>:
<http://sourceforge.net/p/inkscape/mailman/message/32624259/>

AFAICT similar changes have been committed to trunk already:
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/annotate/head:/src/io/inkjar.cpp#L104>

Can this report be closed as 'Fix committed' with milestone 0.91, or does the code in trunk need additional fixes too?

Changed in inkscape:
status: New → Incomplete
tags: added: code-design
Pino Toscano (pinotree) wrote :

I don't know what is the situation of trunk.

On the other hand, even if 0.48.x will not have further releases, I think it is not a good idea to leave such broken code unfixed, even for distros/people cherrypicking bugfixes from that branch.

(And why has this bug been changed as "Incomplete", then?)

su_v (suv-lp) on 2014-07-22
Changed in inkscape:
status: Incomplete → New
Pino Toscano (pinotree) wrote :

Ping? Any possibility to fix this broken code in 0.48.x?

su_v (suv-lp) wrote :

Thx for the patch - committed to stable release branch <lp:inkscape/0.48.x> in rev 10042.

su_v (suv-lp) wrote :

Setting milestone to 0.91 for now:
- code in trunk is already ok, as confirmed by Liam P. White on irc
- no milestone target available in the bug tracker for another bug-fix release of the stable release branch

Wrt new release in the stable series: see also bug #1323592 comments 11 and 12 (possibly there might be a micro-release 0.48.5.1 …)

Changed in inkscape:
importance: Undecided → Medium
milestone: none → 0.91
status: New → Fix Committed
Bryce Harrington (bryce) on 2015-02-23
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Patches