changeset 8266:b37211166855

[gaim-migrate @ 8989] Small oscar bug fix from GoRN (Kevin Barry) - gorn: "In the oscar_tooltip_text ret is a pointer to a string with a trailing \n, so at the end the \n is removed. However if the string is never set (For mobile users or AOL users) then you're chopping off something you shouldn't. On x86 this doesn't seem to matter (But could maybe do something bad (tm) under some cases), however on PPC this causes a segfault every time you hover over a mobile or AOL user." committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 16 Feb 2004 04:01:05 +0000
parents b7ff849f48dd
children 62af52b1614a
files COPYRIGHT src/protocols/oscar/oscar.c
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Sun Feb 15 21:47:43 2004 +0000
+++ b/COPYRIGHT	Mon Feb 16 04:01:05 2004 +0000
@@ -7,6 +7,7 @@
 Paul A
 Daniel Atallah
 Patrick Aussems
+Kevin Barry
 Brian Bernas
 Jonas Birmé
 Ethan Blanton
--- a/src/protocols/oscar/oscar.c	Sun Feb 15 21:47:43 2004 +0000
+++ b/src/protocols/oscar/oscar.c	Mon Feb 16 04:01:05 2004 +0000
@@ -5685,7 +5685,7 @@
 	}
 
 	/* remove the trailing newline character */
-	if (ret)
+	if (ret && (strlen(ret) > 0))
 		ret[strlen(ret)-1] = '\0';
 	return ret;
 }