Found the problem in source code. In "a_propos" function from file
"widgets.c":

  gchar *authors[] = {"Julien Schmitt", "Zach Davis"};

should be:

  gchar *authors[] = {"Julien Schmitt", "Zach Davis", NULL};

Now standard package build works fine.

Solution patch attached.


2017-03-21 21:45 GMT+01:00 Antonio Cebrián <anceb...@gmail.com>:

> Built package from source also causes segmentation fault:
>
> apt-get source gtkterm
> sudo apt-get build-dep gtkterm
>
> cd gtkterm-0.99.7~rc1/
> debuild -b -us -uc
> src/gtkterm
>
> But disabling stack protector strong solves the problem:
>
> DEB_BUILD_MAINT_OPTIONS=hardening=-stackprotectorstrong debuild -b -us -uc
> src/gtkterm
>
> Now Help -> About... works fine.
>
> Perhaps fixing C source code to pass stack protector strong (instead of
> disabling it) should be a better solution.
>
> Best regards.
>
>
>
> 2017-03-21 1:07 GMT+01:00 Antonio Cebrián <anceb...@gmail.com>:
>
>> The problem seems to be related to a wrong string pointer in strlen
>> function:
>>
>> Thread 1 "gtkterm" received signal SIGSEGV, Segmentation fault.
>> strlen () at ../sysdeps/x86_64/strlen.S:106
>> 106    ../sysdeps/x86_64/strlen.S: No such file or directory.
>>
>>
>> 2017-03-21 0:39 GMT+01:00 Antonio Cebrian <anceb...@gmail.com>:
>>
>>> Package: gtkterm
>>> Version: 0.99.7~rc1-0.3
>>> Severity: normal
>>>
>>> Dear Maintainer,
>>>
>>> Menu entry Help -> About.. causes segmentation fault instead of showing
>>> about dialog.
>>>
>>> -- System Information:
>>> Debian Release: 9.0
>>>   APT prefers testing
>>>   APT policy: (500, 'testing')
>>> Architecture: amd64 (x86_64)
>>>
>>> Kernel: Linux 4.9.0-2-amd64 (SMP w/1 CPU core)
>>> Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
>>> Shell: /bin/sh linked to /bin/dash
>>> Init: systemd (via /run/systemd/system)
>>>
>>> Versions of packages gtkterm depends on:
>>> ii  libatk1.0-0          2.22.0-1
>>> ii  libc6                2.24-9
>>> ii  libcairo2            1.14.8-1
>>> ii  libfontconfig1       2.11.0-6.7+b1
>>> ii  libfreetype6         2.6.3-3+b2
>>> ii  libgdk-pixbuf2.0-0   2.36.5-2
>>> ii  libglib2.0-0         2.50.3-1
>>> ii  libgtk2.0-0          2.24.31-2
>>> ii  libpango-1.0-0       1.40.4-1
>>> ii  libpangocairo-1.0-0  1.40.4-1
>>> ii  libpangoft2-1.0-0    1.40.4-1
>>> ii  libvte9              1:0.28.2-5+b2
>>> ii  libx11-6             2:1.6.4-3
>>> ii  libxext6             2:1.3.3-1+b2
>>>
>>> gtkterm recommends no packages.
>>>
>>> gtkterm suggests no packages.
>>>
>>> -- no debconf information
>>>
>>
>>
>
diff -Nru gtkterm-0.99.7~rc1.orig/src/widgets.c gtkterm-0.99.7~rc1/src/widgets.c
--- gtkterm-0.99.7~rc1.orig/src/widgets.c	2011-10-31 01:50:22.000000000 +0100
+++ gtkterm-0.99.7~rc1/src/widgets.c	2017-03-22 23:40:21.987934362 +0100
@@ -537,7 +537,7 @@
 gint a_propos(GtkWidget *widget, guint param)
 {
 
-  gchar *authors[] = {"Julien Schmitt", "Zach Davis"};
+  gchar *authors[] = {"Julien Schmitt", "Zach Davis", NULL};
   gtk_show_about_dialog(NULL,
                         "program-name", "GtkTerm",
                         "title", _("About GtkTerm"),

Reply via email to