Corrupt filename created when saving from XSane scan viewer
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:/
----
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_
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://
Related branches
Changed in xsane (Debian): | |
status: | Unknown → New |
Changed in xsane (Debian): | |
status: | New → Fix Released |
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.]