Corrupt filename created when saving from XSane scan viewer

Bug #914711 reported by Mat
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xsane (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Package: xsane
Version: 0.997-2ubuntu3

I have reported the following bug to the XSane bug tracker at https://alioth.debian.org/tracker/index.php?func=detail&aid=313503 and on Debian BTS (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=655456#5) but it was suggested that I also report it here as the upstream project has not made a release in over a year.

----

When scanning to the viewing window then saving a file, changes to the file type cause the filename to fill with spurious characters, the system to report an 'Invalid file name' then 'A fatal error occured while running the scanning application'.

Environment: XSane 0.997 on Ubuntu 10.10.

Issue can be duplicated as follows:
* Start XSane.
* In main control window select Type as 'JPEG'.
* In main control window select Target as 'Viewer'.
* Carry out scan, setting other options if necessary.
* The Viewer window should open.
* Select File->Save image.
* In the Type drop-down chooser, select 'PDF'. Observe that the Name textbox changes appropriately.
* In the Type drop-down chooser select 'by ext'. Observer that the non-printable text is entered into the Name textbox.

Of course, as a workaround it is possible to manually remove the non-printable text and enter a new filename in the Name textbox.

----

The problem was traced to xsane 0.997 source code, file: xsane-back-gtk.c, function: xsane_back_gtk_filetype2_callback.

Code in this function will determine the new name for a file when a file extension is chosen from the Type drop-drown chooser. When 'by ext' is chosen no code is executed to populate the string pointed to by the filename, leaving uninitialised memory at this location. The uninitialised memory is later copied back to the UI.

The attached patch against XSane 0.998 (http://www.xsane.org/download/xsane-0.998.tar.gz) resolves this issue.

Tags: patch

Related branches

Revision history for this message
Mat (matthewb-e) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "xsane-back-gtk.c.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Changed in xsane (Debian):
status: Unknown → New
Changed in xsane (Debian):
status: New → Fix Released
Revision history for this message
penalvch (penalvch) wrote :

Mat, thank you for reporting this and helping make Ubuntu better.

As per https://wiki.ubuntu.com/Releases your release is EOL.

If you have an issue in a supported release (ex. 16.04) please file a new report, and feel free to subscribe me to it.

no longer affects: xsane (Ubuntu)
affects: xsane (Debian) → xsane (Ubuntu)
no longer affects: xsane (Ubuntu)
affects: xsane → xsane (Ubuntu)
Changed in xsane (Ubuntu):
importance: Unknown → Undecided
status: Unknown → New
status: New → Invalid
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.