openbsd-ports/net/bitlbee/patches/patch-protocols_oscar_oscar_util_c
naddy a2c69a5b0d Update to 0.90.
Partial audit for string handling.

From: Andrew Dalgleish <openbsd@ajd.net.au>
2004-06-20 16:27:49 +00:00

14 lines
580 B
Plaintext

$OpenBSD: patch-protocols_oscar_oscar_util_c,v 1.1 2004/06/20 16:27:49 naddy Exp $
--- protocols/oscar/oscar_util.c.orig 2004-05-19 05:44:58.000000000 +1000
+++ protocols/oscar/oscar_util.c 2004-06-09 21:12:06.000000000 +1000
@@ -87,8 +87,7 @@ faim_export char *aimutil_itemidx(char *
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));