Package: dotconf
Version: 1.0.13-2
Severity: important
Tags: patch
User: [email protected]
Usertags: origin-ubuntu karmic ubuntu-patch

A user of Ubuntu found that the dotconf library caused the speech-dispatcher 
application to crash at random dueo to an improper use of realloc. Here is the 
patch to fix this behavior.

*** /tmp/tmp8IFlZW
In Ubuntu, we've applied the attached patch to achieve the following:

  * Correctly make use of realloc, to prevent applications using dotconf from
    crashing randomly, Thanks to Eitan Isaacson <[email protected]> for the
    patch. (LP: #427066)

We thought you might be interested in doing the same. 


-- System Information:
Debian Release: squeeze/sid
  APT prefers karmic
  APT policy: (500, 'karmic')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31-10-generic (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- dotconf-1.0.13.orig/src/dotconf.c
+++ dotconf-1.0.13/src/dotconf.c
@@ -1016,9 +1016,9 @@
 
                                                if ( new_path_len > alloced )
                                                {
-                                                       if ( 
realloc(new_path,new_path_len) == NULL )
+                                                       new_path = 
realloc(new_path,new_path_len);
+                                                       if ( new_path == NULL )
                                                        {
-                                                               free(new_path);
                                                                return -1;
                                                        }
 
@@ -1174,9 +1174,9 @@
 
                                                if ( new_path_len > alloced )
                                                {
-                                                       if ( 
realloc(new_path,new_path_len) == NULL )
+                                                       new_path = 
realloc(new_path,new_path_len);
+                                                       if ( new_path == NULL )
                                                        {
-                                                               free(new_path);
                                                                return -1;
                                                        }
 

Reply via email to