Bug#859407: abook dies with SIGSEGV on vcard convert

2017-08-04 Thread Denis Briand
tags 859407 pending patch
thanks

Hello,
Thank you for your bug report.
Here is a patch to fix the issue.
Next version is pending upload.

best regards

Denis Briand
Author: Denis Briand 
Bug-Debian: https://bugs.debian.org/859407
Description: if USER env variable isn't defined, use nobody account to avoid SIGSEGV with getpwnam

--- a/filter.c
+++ b/filter.c
@@ -186,6 +186,11 @@
 	int rtn;
 	char *tmp;
 
+	//if USER env variable isn't defined, use nobody account to avoid SIGSEGV with getpwnam
+	if (!username) {
+  username = "nobody";
+   }
+
 	pwent = getpwnam(username);
 
 	if((tmp = xstrdup(pwent->pw_gecos)) == NULL)


pgpnFpCNtc3Wb.pgp
Description: PGP signature


Bug#859407: abook dies with SIGSEGV on vcard convert

2017-04-05 Thread Raphaël
I can reproduce using:
$ USER= abook --convert --informat vcard < xx000

(There is a call to getpwnam($USER), SIGSEGV happens if $USER is not set)


signature.asc
Description: Digital signature


Bug#859407: abook dies with SIGSEGV on vcard convert

2017-04-03 Thread Jörg Sommer
Package: abook
Version: 0.6.1-1+b1
Severity: normal

Hi,

% cat xx001
BEGIN:VCARD
VERSION:2.1
N:Jon;Doe;;;
FN:Doe Jon
TEL;X-Mobil:+490111010
END:VCARD
% gdb --batch =abook -ex 'r --convert --informat vcard < xx000' -ex bt

Program received signal SIGSEGV, Segmentation fault.
_nss_compat_getpwnam_r (name=0x0, pwd=0x7772ed80 , 
buffer=0x557785a0 "", buflen=1024, errnop=0x77fd1698) at 
nss_compat/compat-pwd.c:859
859 nss_compat/compat-pwd.c: Datei oder Verzeichnis nicht gefunden.
#0  _nss_compat_getpwnam_r (name=0x0, pwd=0x7772ed80 , 
buffer=0x557785a0 "", buflen=1024, errnop=0x77fd1698) at 
nss_compat/compat-pwd.c:859
#1  0x7744b196 in __getpwnam_r (name=name@entry=0x0, 
resbuf=resbuf@entry=0x7772ed80 , buffer=0x557785a0 "", 
buflen=buflen@entry=1024, result=result@entry=0x7fffe308) at 
../nss/getXXbyYY_r.c:315
#2  0x7744ab50 in getpwnam (name=name@entry=0x0) at 
../nss/getXXbyYY.c:116
#3  0xf54b in get_real_name () at filter.c:189
#4  0xf5cb in text_export_database (out=0x7772d600 
<_IO_2_1_stdout_>, e=...) at filter.c:2379
#5  0x55562a76 in export_file (filtname=0x5556a24a "text", 
filename=0x55569c51 "-") at filter.c:491
#6  0x93ac in convert (dstfile=0x55569c51 "-", 
dstformat=0x5556a24a "text", srcfile=0x55569c51 "-", 
srcformat=0x7fffe85c "vcard") at abook.c:679
#7  parse_command_line (argv=0x7fffe5b8, argc=4) at abook.c:436
#8  main (argc=4, argv=0x7fffe5b8) at abook.c:206

Regards Jörg

-- System Information:
Debian Release: 9.0
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.10.0-trunk-amd64 (SMP w/8 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages abook depends on:
ii  debconf [debconf-2.0]  1.5.60
ii  libc6  2.24-9
ii  libncursesw5   6.0+20161126-1
ii  libreadline7   7.0-2
ii  libtinfo5  6.0+20161126-1

abook recommends no packages.

abook suggests no packages.

-- debconf information excluded


signature.asc
Description: PGP signature