Package: speech-dispatcher Version: 0.6.7~rc1-1 Severity: important Tag: patch
In src/c/api/libspeechd.c:spd_open() you have ---<snip>--- connection = xmalloc(sizeof(SPDConnection)); /* Prepare a new socket */ address.sin_addr.s_addr = inet_addr("127.0.0.1"); address.sin_port = htons(port); address.sin_family = AF_INET; connection->socket = socket(AF_INET, SOCK_STREAM, 0); #ifdef LIBSPEECHD_DEBUG [...] #endif /* LIBSPEECHD_DEBUG */ /* Connect to server */ ret = connect(connection->socket, (struct sockaddr *)&address, sizeof(address)); if (ret == -1){ SPD_DBG("Error: Can't connect to server: %s", strerror(errno)); return NULL; } ---<snip>--- Which leads to a leaked socket (and memory?) whenever the speech-dispatcher daemon is not currently running. With a fast retry interval, this can easily lead to a client app running out of file descriptors (observed with BRLTTY and the SD driver). --- speech-dispatcher-0.6.7~rc1/src/c/api/libspeechd.c.orig 2008-04-09 13:39:06.000000000 +0200 +++ speech-dispatcher-0.6.7~rc1/src/c/api/libspeechd.c 2008-12-23 01:49:27.000000000 +0100 @@ -136,6 +136,7 @@ ret = connect(connection->socket, (struct sockaddr *)&address, sizeof(address)); if (ret == -1){ SPD_DBG("Error: Can't connect to server: %s", strerror(errno)); + close(connection->socket); return NULL; } -- System Information: Debian Release: 5.0 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages speech-dispatcher depends on: ii adduser 3.110 add and remove users and groups ii libasound2 1.0.16-2 ALSA library ii libaudio2 1.9.1-5 Network Audio System - shared libr ii libc6 2.7-16 GNU C Library: Shared libraries ii libdotconf1.0 1.0.13-2 Configuration file parser library ii libespeak1 1.37-1 A multi-lingual software speech sy ii libflite1 1.2-release-2.4 a small run-time speech synthesis ii libglib2.0-0 2.16.6-1 The GLib library of C routines ii libpulse0 0.9.10-3 PulseAudio client libraries ii libspeechd2 0.6.7~rc1-1 Speech Dispatcher: Shared librarie ii lsb-base 3.2-20 Linux Standard Base 3.2 init scrip speech-dispatcher recommends no packages. Versions of packages speech-dispatcher suggests: pn speech-dispatcher-doc-cs <none> (no description available) pn speech-dispatcher-festival <none> (no description available) -- no debconf information -- CYa, ⡍⠁⠗⠊⠕ | Debian Developer <URL:http://debian.org/> .''`. | Get my public key via finger mlang/k...@db.debian.org : :' : | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44 `. `' `- <URL:http://delysid.org/> <URL:http://www.staff.tugraz.at/mlang/> -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org