Package: newt
Version: 0.52.10-3
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu jaunty ubuntu-patch


The attached patch fixes a crash that I got with python-newt when 
reusing a Textbox multiple times with SetText().

    - 029_crash_fix.patch:fix crash in SetText (LP: #352679)

We thought you might be interested in doing the same. 

Cheers,
 Michael

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

Kernel: Linux 2.6.28-11-generic (SMP w/2 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- newt-0.52.10.orig/debian/patches/029_crash_fix.patch
+++ newt-0.52.10/debian/patches/029_crash_fix.patch
@@ -0,0 +1,12 @@
+diff -ruN newt-0.52.10-old/textbox.c newt-0.52.10/textbox.c
+--- newt-0.52.10-old/textbox.c 2009-04-30 13:51:07.000000000 +0200
++++ newt-0.52.10/textbox.c     2009-04-30 13:52:36.000000000 +0200
+@@ -306,7 +306,7 @@
+       for (i = 0; i < tb->numLines; i++) 
+           free(tb->lines[i]);
+       free(tb->lines);
+-      tb->linesAlloced = tb->numLines = 0;
++      tb->linesAlloced = tb->numLines = tb->topLine = 0;
+     }
+ 
+     expanded = expandTabs(text);

Reply via email to