scratch-text-editor crashes with SIGSEGV in g_utf8_validate() on opening files with insufficient permissions

Bug #1189224 reported by Sergey "Shnatsel" Davidoff
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scratch
Fix Released
Medium
Mario Guerriero

Bug Description

If you try to open a file which you don't have permission to read in Scratch, it will crash.

Steps to reproduce:
1) echo "test" > testfile
2) chmod 600 testfile
3) chown root testfile
4) scratch-text-editor testfile

ProblemType: Crash
DistroRelease: elementary OS 0.2
Package: scratch-text-editor 2.0~r1088-0+pkg45~precise1 [origin: LP-PPA-elementary-os-daily]
ProcVersionSignature: Ubuntu 3.2.0-45.70-generic 3.2.44
Uname: Linux 3.2.0-45-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.2+elementary3~precise1
Architecture: amd64
CrashDB: scratch_text_editor
Date: Sun Jun 9 23:18:33 2013
ExecutablePath: /usr/bin/scratch-text-editor
GsettingsChanges:

InstallationMedia: elementary OS 0.2 "Luna" - Daily amd64 (20130601)
MarkForUpload: True
ProcCmdline: scratch-text-editor /etc/cjdroute.conf
ProcEnviron:
 SHELL=/bin/bash
 TERM=xterm
 PATH=(custom, no user)
 LANG=ru_RU.UTF-8
SegvAnalysis:
 Segfault happened at: 0x7f34741fc208 <g_utf8_validate+488>: movzbl (%rdi),%r8d
 PC (0x7f34741fc208) ok
 source "(%rdi)" (0x00000000) not located in a known VMA region (needed readable region)!
 destination "%r8d" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: scratch-text-editor
StacktraceTop:
 g_utf8_validate () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 ?? ()
 g_simple_async_result_complete () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
 ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
 g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
Title: scratch-text-editor crashed with SIGSEGV in g_utf8_validate()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :
information type: Private → Public
Changed in scratch:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → 2.1
Changed in scratch:
assignee: nobody → Mario Guerriero (mefrio-g)
status: Confirmed → Fix Released
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.