fuseiso loops parsing options on aarch64

Bug #1661289 reported by Dan Andreșan
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
fuseiso (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

On ARM64 (aarch64) fuseiso does not work. It loops forever. Tracing shows looping with getopt, so parsing command line options.

To reproduse - on aarch64 - just type fuseiso, no need to bother with options. See that it does nothing (visible), just stays there. With top one can see one CPU going to 100%

I reported patch to the original developer but it seems fuseiso is not maintained since 2007.
https://sourceforge.net/p/fuseiso/patches/2/

The loop happens because getopt returns -1 (no more options) which is assigned to a char. Type char on arm64 is always unsigned, so the test for ">0" will always be true. The loop thinks it has more options to parse resulting in an infinite cycle.

Fix simply changes the type of lvalue from char to int.

Patch is attached. With it fuseison on arm64 works as on x86.

Thank you,
Dan.

Tags: patch
Revision history for this message
Dan Andreșan (danyer) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "0001-Fix-infinite-loop-parsing-line-options-on-arm64.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in fuseiso (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.