openbsd-ports/net/bitlbee/patches/patch-protocols_oscar_oscar_util_c

14 lines
558 B
Plaintext
Raw Normal View History

$OpenBSD: patch-protocols_oscar_oscar_util_c,v 1.2 2004/10/21 14:48:51 naddy Exp $
--- protocols/oscar/oscar_util.c.orig Wed Apr 28 01:36:33 2004
+++ protocols/oscar/oscar_util.c Thu Oct 14 15:43:35 2004
@@ -86,8 +86,7 @@ char *aimutil_itemidx(char *toSearch, in
toReturn = g_strdup("");
} else {
if (next == NULL) {
- toReturn = g_malloc((strlen(last) + 1) * sizeof(char));
- strcpy(toReturn, last);
+ toReturn = g_strdup(last);
} else {
toReturn = g_malloc((next - last + 1) * sizeof(char));
memcpy(toReturn, last, (next - last));