Mercurial > pidgin
changeset 24688:08b65145276a
Fix off-by-ones in the perl loader where av_len is used. Fixes #7687.
committer: John Bailey <rekkanoryo@rekkanoryo.org>
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Thu, 11 Dec 2008 06:38:23 +0000 |
parents | d8452c0bec7b |
children | 7fd6e5a72bf1 68a90c95b722 |
files | libpurple/plugins/perl/common/Account.xs libpurple/plugins/perl/common/AccountOpts.xs libpurple/plugins/perl/common/Conversation.xs libpurple/plugins/perl/common/Prefs.xs libpurple/plugins/perl/common/Roomlist.xs libpurple/plugins/perl/common/Status.xs pidgin/plugins/perl/common/GtkIMHtml.xs |
diffstat | 7 files changed, 19 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/plugins/perl/common/Account.xs Thu Dec 11 06:32:05 2008 +0000 +++ b/libpurple/plugins/perl/common/Account.xs Thu Dec 11 06:38:23 2008 +0000 @@ -105,7 +105,7 @@ int i, t_len; PPCODE: t_GL = NULL; - t_len = av_len((AV *)SvRV(status_types)); + t_len = av_len((AV *)SvRV(status_types)) + 1; for (i = 0; i < t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(status_types), i, 0))); @@ -207,7 +207,7 @@ int i, t_len; PPCODE: t_GL = NULL; - t_len = av_len((AV *)SvRV(list)); + t_len = av_len((AV *)SvRV(list)) + 1; for (i = 0; i < t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(list), i, 0))); @@ -236,13 +236,13 @@ int i, t_len; PPCODE: t_GL1 = NULL; - t_len = av_len((AV *)SvRV(A)); + t_len = av_len((AV *)SvRV(A)) + 1; for (i = 0; i < t_len; i++) t_GL1 = g_list_append(t_GL1, SvPVutf8_nolen(*av_fetch((AV *)SvRV(A), i, 0))); t_GL2 = NULL; - t_len = av_len((AV *)SvRV(B)); + t_len = av_len((AV *)SvRV(B)) + 1; for (i = 0; i < t_len; i++) t_GL2 = g_list_append(t_GL2, SvPVutf8_nolen(*av_fetch((AV *)SvRV(B), i, 0)));
--- a/libpurple/plugins/perl/common/AccountOpts.xs Thu Dec 11 06:32:05 2008 +0000 +++ b/libpurple/plugins/perl/common/AccountOpts.xs Thu Dec 11 06:38:23 2008 +0000 @@ -42,7 +42,7 @@ int i, t_len; CODE: t_GL = NULL; - t_len = av_len((AV *)SvRV(values)); + t_len = av_len((AV *)SvRV(values)) + 1; for (i = 0; i < t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(values), i, 0))); @@ -130,7 +130,7 @@ int i, t_len; PPCODE: t_GL = NULL; - t_len = av_len((AV *)SvRV(values)); + t_len = av_len((AV *)SvRV(values)) + 1; for (i = 0; i < t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(values), i, 0)));
--- a/libpurple/plugins/perl/common/Conversation.xs Thu Dec 11 06:32:05 2008 +0000 +++ b/libpurple/plugins/perl/common/Conversation.xs Thu Dec 11 06:38:23 2008 +0000 @@ -334,7 +334,7 @@ int i, t_len; PPCODE: t_GL = NULL; - t_len = av_len((AV *)SvRV(users)); + t_len = av_len((AV *)SvRV(users)) + 1; for (i = 0; i < t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(users), i, 0))); @@ -372,7 +372,7 @@ int i, t_len; PPCODE: t_GL = NULL; - t_len = av_len((AV *)SvRV(ignored)); + t_len = av_len((AV *)SvRV(ignored)) + 1; for (i = 0; i < t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(ignored), i, 0))); @@ -429,19 +429,19 @@ int i, t_len; PPCODE: t_GL_users = NULL; - t_len = av_len((AV *)SvRV(users)); + t_len = av_len((AV *)SvRV(users)) + 1; for (i = 0; i < t_len; i++) t_GL_users = g_list_append(t_GL_users, SvPVutf8_nolen(*av_fetch((AV *)SvRV(users), i, 0))); t_GL_flags = NULL; - t_len = av_len((AV *)SvRV(flags)); + t_len = av_len((AV *)SvRV(flags)) + 1; for (i = 0; i < t_len; i++) t_GL_flags = g_list_append(t_GL_flags, SvPVutf8_nolen(*av_fetch((AV *)SvRV(flags), i, 0))); t_GL_extra_msgs = NULL; - t_len = av_len((AV *)SvRV(extra_msgs)); + t_len = av_len((AV *)SvRV(extra_msgs)) + 1; for (i = 0; i < t_len; i++) t_GL_extra_msgs = g_list_append(t_GL_extra_msgs, SvPVutf8_nolen(*av_fetch((AV *)SvRV(extra_msgs), i, 0)));
--- a/libpurple/plugins/perl/common/Prefs.xs Thu Dec 11 06:32:05 2008 +0000 +++ b/libpurple/plugins/perl/common/Prefs.xs Thu Dec 11 06:38:23 2008 +0000 @@ -51,7 +51,7 @@ int i, t_len; PPCODE: t_GL = NULL; - t_len = av_len((AV *)SvRV(value)); + t_len = av_len((AV *)SvRV(value)) + 1; for (i = 0; i < t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(value), i, 0))); @@ -73,7 +73,7 @@ int i, t_len; PPCODE: t_GL = NULL; - t_len = av_len((AV *)SvRV(value)); + t_len = av_len((AV *)SvRV(value)) + 1; for (i = 0; i < t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(value), i, 0))); @@ -202,7 +202,7 @@ int i, t_len; PPCODE: t_GL = NULL; - t_len = av_len((AV *)SvRV(value)); + t_len = av_len((AV *)SvRV(value)) + 1; for (i = 0; i < t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(value), i, 0))); @@ -224,7 +224,7 @@ int i, t_len; PPCODE: t_GL = NULL; - t_len = av_len((AV *)SvRV(value)); + t_len = av_len((AV *)SvRV(value)) + 1; for (i = 0; i < t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(value), i, 0)));
--- a/libpurple/plugins/perl/common/Roomlist.xs Thu Dec 11 06:32:05 2008 +0000 +++ b/libpurple/plugins/perl/common/Roomlist.xs Thu Dec 11 06:38:23 2008 +0000 @@ -78,7 +78,7 @@ int i, t_len; PPCODE: t_GL = NULL; - t_len = av_len((AV *)SvRV(fields)); + t_len = av_len((AV *)SvRV(fields)) + 1; for (i = 0; i < t_len; i++) t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(fields), i, 0)));
--- a/libpurple/plugins/perl/common/Status.xs Thu Dec 11 06:32:05 2008 +0000 +++ b/libpurple/plugins/perl/common/Status.xs Thu Dec 11 06:38:23 2008 +0000 @@ -83,7 +83,7 @@ int i, t_len; PPCODE: t_GL = NULL; - t_len = av_len((AV *)SvRV(source_list)); + t_len = av_len((AV *)SvRV(source_list)) + 1; for (i = 0; i < t_len; i++) { t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(source_list), i, 0))); @@ -379,7 +379,7 @@ int i, t_len; CODE: t_GL = NULL; - t_len = av_len((AV *)SvRV(status_types)); + t_len = av_len((AV *)SvRV(status_types)) + 1; for (i = 0; i < t_len; i++) { t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(status_types), i, 0)));
--- a/pidgin/plugins/perl/common/GtkIMHtml.xs Thu Dec 11 06:32:05 2008 +0000 +++ b/pidgin/plugins/perl/common/GtkIMHtml.xs Thu Dec 11 06:38:23 2008 +0000 @@ -171,7 +171,7 @@ int i, t_len; PPCODE: t_GL = NULL; - t_len = av_len((AV *)SvRV(unused)); + t_len = av_len((AV *)SvRV(unused)) + 1; for (i = 0; i < t_len; i++) { STRLEN t_sl;