Bug#863420: timemachine: segfaults on startup

2017-05-27 Thread Chris Lamb
James Cowgill wrote:

> I tested your fixes, unfortunately timemachine still segfaults on
> startup. This time it occurs in gtk_meterscale_new and it looks like the
> same pointer truncation problem there.

Huh, how did I miss that. Anyway, I've re-uploaded timemachine 0.3.3-2.1 to
DELAYED/5:
  
  timemachine (0.3.3-2.1) unstable; urgency=medium
  
* Non-maintainer upload.
* Fix two segmentation faults in src/gtkmeter.c and gtkmeterscale.c caused
  by passing a truncated pointers using guint instead of a GtkType.
  (Closes: #863420)

The full debdiff is attached.


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-
diffstat for timemachine-0.3.3 timemachine-0.3.3

 changelog |9 +
 patches/0002-truncated-pointers.patch |   52 ++
 patches/series|1 
 3 files changed, 62 insertions(+)

diff -Nru timemachine-0.3.3/debian/changelog timemachine-0.3.3/debian/changelog
--- timemachine-0.3.3/debian/changelog  2013-10-06 14:13:24.0 +0100
+++ timemachine-0.3.3/debian/changelog  2017-05-27 09:41:19.0 +0100
@@ -1,3 +1,12 @@
+timemachine (0.3.3-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix two segmentation faults in src/gtkmeter.c and gtkmeterscale.c caused
+by passing a truncated pointers using guint instead of a GtkType.
+(Closes: #863420)
+
+ -- Chris Lamb   Sat, 27 May 2017 09:41:19 +0100
+
 timemachine (0.3.3-2) unstable; urgency=low
 
   * Team upload.
diff -Nru timemachine-0.3.3/debian/patches/0002-truncated-pointers.patch 
timemachine-0.3.3/debian/patches/0002-truncated-pointers.patch
--- timemachine-0.3.3/debian/patches/0002-truncated-pointers.patch  
1970-01-01 01:00:00.0 +0100
+++ timemachine-0.3.3/debian/patches/0002-truncated-pointers.patch  
2017-05-27 09:41:19.0 +0100
@@ -0,0 +1,52 @@
+--- timemachine-0.3.3.orig/src/gtkmeter.c
 timemachine-0.3.3/src/gtkmeter.c
+@@ -48,10 +48,10 @@ static float iec_scale(float db);
+ 
+ static GtkWidgetClass *parent_class = NULL;
+ 
+-guint
++GtkType
+ gtk_meter_get_type ()
+ {
+-  static guint meter_type = 0;
++  static GtkType meter_type = 0;
+ 
+   if (!meter_type)
+ {
+--- timemachine-0.3.3.orig/src/gtkmeter.h
 timemachine-0.3.3/src/gtkmeter.h
+@@ -87,7 +87,7 @@ struct _GtkMeterClass
+ GtkWidget* gtk_meter_new(GtkAdjustment *adjustment,
+gint direction);
+ 
+-guint  gtk_meter_get_type   (void);
++GtkTypegtk_meter_get_type   (void);
+ GtkAdjustment* gtk_meter_get_adjustment (GtkMeter *meter);
+ 
+ void   gtk_meter_set_adjustment (GtkMeter *meter,
+--- timemachine-0.3.3.orig/src/gtkmeterscale.c
 timemachine-0.3.3/src/gtkmeterscale.c
+@@ -45,10 +45,10 @@ static void meterscale_draw_notch(GtkMet
+ 
+ static GtkWidgetClass *parent_class = NULL;
+ 
+-guint
++GtkType
+ gtk_meterscale_get_type ()
+ {
+-  static guint meterscale_type = 0;
++  static GtkType meterscale_type = 0;
+ 
+   if (!meterscale_type)
+ {
+--- timemachine-0.3.3.orig/src/gtkmeterscale.h
 timemachine-0.3.3/src/gtkmeterscale.h
+@@ -67,7 +67,7 @@ GtkWidget* gtk_meterscale_new
+gfloat min,
+gfloat max);
+ 
+-guint  gtk_meterscale_get_type  (void);
++GtkTypegtk_meterscale_get_type  (void);
+ 
+ #ifdef __cplusplus
+ }
diff -Nru timemachine-0.3.3/debian/patches/series 
timemachine-0.3.3/debian/patches/series
--- timemachine-0.3.3/debian/patches/series 2013-10-06 14:09:12.0 
+0100
+++ timemachine-0.3.3/debian/patches/series 2017-05-27 09:41:19.0 
+0100
@@ -1 +1,2 @@
 0001-ldflags.patch
+0002-truncated-pointers.patch


Bug#863420: timemachine: segfaults on startup

2017-05-27 Thread James Cowgill
Hi Chris,

On 27/05/17 10:02, Chris Lamb wrote:
> tags 863420 + pending patch
> thanks
> 
> I've uploaded timemachine 0.3.3-2.1 to DELAYED/5:
>   
>   timemachine (0.3.3-2.1) unstable; urgency=medium
>   
> * Non-maintainer upload.
> * Fix segmentation fault caused by passing a truncated pointer instead of 
> a
>   GtkType. (Closes: #863420)
> 
> The full debdiff is attached.

I tested your fixes, unfortunately timemachine still segfaults on
startup. This time it occurs in gtk_meterscale_new and it looks like the
same pointer truncation problem there. I notice this code is in jackeq
as well, but maybe jackeq doesn't use it on startup?

James



Bug#863420: timemachine: segfaults on startup

2017-05-27 Thread Chris Lamb
tags 863420 + pending patch
thanks

I've uploaded timemachine 0.3.3-2.1 to DELAYED/5:
  
  timemachine (0.3.3-2.1) unstable; urgency=medium
  
* Non-maintainer upload.
* Fix segmentation fault caused by passing a truncated pointer instead of a
  GtkType. (Closes: #863420)

The full debdiff is attached.


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-
diffstat for timemachine-0.3.3 timemachine-0.3.3

 changelog |8 
 patches/0002-gtkmeter-truncated-pointer.patch |   26 ++
 patches/series|1 +
 3 files changed, 35 insertions(+)

diff -Nru timemachine-0.3.3/debian/changelog timemachine-0.3.3/debian/changelog
--- timemachine-0.3.3/debian/changelog  2013-10-06 14:13:24.0 +0100
+++ timemachine-0.3.3/debian/changelog  2017-05-27 09:41:19.0 +0100
@@ -1,3 +1,11 @@
+timemachine (0.3.3-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix segmentation fault caused by passing a truncated pointer instead of a
+GtkType. (Closes: #863420)
+
+ -- Chris Lamb   Sat, 27 May 2017 09:41:19 +0100
+
 timemachine (0.3.3-2) unstable; urgency=low
 
   * Team upload.
diff -Nru 
timemachine-0.3.3/debian/patches/0002-gtkmeter-truncated-pointer.patch 
timemachine-0.3.3/debian/patches/0002-gtkmeter-truncated-pointer.patch
--- timemachine-0.3.3/debian/patches/0002-gtkmeter-truncated-pointer.patch  
1970-01-01 01:00:00.0 +0100
+++ timemachine-0.3.3/debian/patches/0002-gtkmeter-truncated-pointer.patch  
2017-05-27 09:41:19.0 +0100
@@ -0,0 +1,26 @@
+--- timemachine-0.3.3.orig/src/gtkmeter.c
 timemachine-0.3.3/src/gtkmeter.c
+@@ -48,10 +48,10 @@ static float iec_scale(float db);
+ 
+ static GtkWidgetClass *parent_class = NULL;
+ 
+-guint
++GtkType
+ gtk_meter_get_type ()
+ {
+-  static guint meter_type = 0;
++  static GtkType meter_type = 0;
+ 
+   if (!meter_type)
+ {
+--- timemachine-0.3.3.orig/src/gtkmeter.h
 timemachine-0.3.3/src/gtkmeter.h
+@@ -87,7 +87,7 @@ struct _GtkMeterClass
+ GtkWidget* gtk_meter_new(GtkAdjustment *adjustment,
+gint direction);
+ 
+-guint  gtk_meter_get_type   (void);
++GtkTypegtk_meter_get_type   (void);
+ GtkAdjustment* gtk_meter_get_adjustment (GtkMeter *meter);
+ 
+ void   gtk_meter_set_adjustment (GtkMeter *meter,
diff -Nru timemachine-0.3.3/debian/patches/series 
timemachine-0.3.3/debian/patches/series
--- timemachine-0.3.3/debian/patches/series 2013-10-06 14:09:12.0 
+0100
+++ timemachine-0.3.3/debian/patches/series 2017-05-27 09:41:19.0 
+0100
@@ -1 +1,2 @@
 0001-ldflags.patch
+0002-gtkmeter-truncated-pointer.patch