gnome-screenshot crashes with core dump

Bug #949341 reported by Blackbug
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnome-screenshot (Ubuntu)
Confirmed
Undecided
Blackbug

Bug Description

gnome-screenshot crashes with core dump when incorrect filename is entered with '/'.
I guess a check for '/' is required, investigating further.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: gnome-screenshot 3.3.91-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-18.28-generic 3.2.9
Uname: Linux 3.2.0-18-generic x86_64
ApportVersion: 1.94-0ubuntu2
Architecture: amd64
Date: Thu Mar 8 00:31:38 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: gnome-screenshot
UpgradeStatus: Upgraded to precise on 2012-03-06 (1 days ago)
---
ApportVersion: 1.94-0ubuntu2
Architecture: amd64
DistroRelease: Ubuntu 12.04
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
Package: gnome-screenshot 3.3.91-0ubuntu1
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 3.2.0-18.28-generic 3.2.9
Tags: precise
Uname: Linux 3.2.0-18-generic x86_64
UpgradeStatus: Upgraded to precise on 2012-03-06 (1 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Blackbug (blackbug-nx) wrote :
Changed in gnome-screenshot (Ubuntu):
assignee: nobody → Blackbug (blackbug-nx)
tags: added: apport-collected
description: updated
Revision history for this message
Blackbug (blackbug-nx) wrote : Dependencies.txt

apport information

Revision history for this message
Blackbug (blackbug-nx) wrote : ProcEnviron.txt

apport information

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

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

Changed in gnome-screenshot (Ubuntu):
status: New → Confirmed
Revision history for this message
Benjamin Kerensa (bkerensa) wrote :

Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

Revision history for this message
Benjamin Kerensa (bkerensa) wrote :

I was able to reproduce and have attached a screenshot and updated the status of bug ^
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Revision history for this message
Blackbug (blackbug-nx) wrote :

I guess the file "screenshot-dialog.c" in the source code should have a check to cater this problem, around line number 304 where it return gchar* which contains the file name string.
However i am not sure about '/' mechanism while saving files in ubuntu, because I could see at line number 276 of the same file (screenshot-dialog.c) another gchar* file, which converts the file name "kk/kk.png" to "kk%2Fkk.png" as %2F represents '/'.
I would appreciate some suggestions and hints on it.

Revision history for this message
Blackbug (blackbug-nx) wrote :

I have written a simple solution for this. Since, the filename with "/" results in coredump, which shouldnt be under any situation. I checked it for '/'. If filename contains '/' displayed a warning and changed the filename to default name ( which is also followed in case of any error ).
I wasnt very sure about how the application flow should be in this scenario, thus implemented this one.
Kindly let me know, in case of any better flow can be implemented.

Thanks.

tags: added: patch
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch.txt" 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.]

Revision history for this message
Blackbug (blackbug-nx) wrote :

Hi Reviewers,

Any updates on the patch and information requested.

Thanks!

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.