Public bug reported:

Xpaint crash when move Region.I send a report and patch.

[Step to produce]

1. launch xpaint
2. open New Canvas
3. choose Toolbox/Select Rectangular Region
4. decide a region on canvas
5. push mouse button 1 on this region
6. xpaint crash due to "stack smashing detected" error

[How to fix]

apply this patch.

--- xpaint-2.9.1.4.orig/PaintRegion.c
+++ xpaint-2.9.1.4/PaintRegion.c
@@ -994,7 +994,6 @@ regionButtonPress(Widget w, PaintWidget
 {
     int zoom = GET_ZOOM(pw);
     static long prev_time = 0;
-    Boolean value;
 
     pw->paint.region.isRotate = (event->button == Button2);
 
@@ -1005,6 +1004,7 @@ regionButtonPress(Widget w, PaintWidget
    
     if (event->button == Button1 && Global.transparent) {
         if (abs(event->time-prev_time) > 300) {
+           int value;
             XtVaGetValues((Widget)pw, XtNtransparent, &value, NULL);
             value = 3 - (value&1);
             XtVaSetValues((Widget)pw, XtNtransparent, value, NULL);

[System]
Package: xpaint 2.9.1.4-3.1
ProblemType: Bug
Architechture: amd64
CurrentDesktop: Unity
Date: Fri May 19 10:42:26 2017
DestroRelease Ubuntu 16.04
InstallationDate: Installed on 2017-01-19(120 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Relase amd64(20160426.1)
PackageArchitechture: amd64
ProcVersionSignature: Ubuntu 4.4.0-71.92-generic 4.4.49
SourcePackage: xpaint
Tags: xenial
Uname: Linux 4.4.0-71-generic x86_64

** Affects: xpaint (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1691906

Title:
  *** stack smashing detected ***: xpaint terminated when move region

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xpaint/+bug/1691906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to