[742] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

[D-O-H] r766 - trunk/owl

daemon@ATHENA.MIT.EDU (nelhage@MIT.EDU)
Thu Oct 29 18:09:14 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: nelhage@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Tue,  2 Oct 2007 00:38:50 -0400 (EDT)

Author: nelhage
Date: 2007-10-02 00:38:49 -0400 (Tue, 02 Oct 2007)
New Revision: 766

Modified:
   trunk/owl/message.c
Log:
Don't crash if we hit `i' on iso-8859-*. This is not the right
solution, but at least it doesn't SEGV.


Modified: trunk/owl/message.c
===================================================================
--- trunk/owl/message.c	2007-09-19 04:41:09 UTC (rev 765)
+++ trunk/owl/message.c	2007-10-02 04:38:49 UTC (rev 766)
@@ -120,6 +120,11 @@
   for (i=0; i<j; i++) {
     p=owl_list_get_element(&(m->attributes), i);
     buff=owl_sprintf("  %-15.15s: %-35.35s\n", owl_pair_get_key(p), owl_pair_get_value(p));
+    if(buff == NULL) {
+      buff=owl_sprintf("  %-15.15s: %-35.35s\n", owl_pair_get_key(p), "<error>");
+      if(buff == NULL)
+        buff=owl_strdup("   <error>\n");
+    }
     owl_fmtext_append_normal(fm, buff);
     owl_free(buff);
   }


home help back first fref pref prev next nref lref last post