Mercurial > pidgin.yaz
changeset 20853:1a44d1a17784
purple_util_write_data_to_file_absolute() should take a signed argument for the size as -1 is used to indicate that the string is nul-delimited. This resolves CID 330.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 09 Oct 2007 23:09:05 +0000 |
parents | 6cc03752fe59 |
children | 686a492e2b70 |
files | libpurple/util.c libpurple/util.h |
diffstat | 2 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/util.c Tue Oct 09 23:01:11 2007 +0000 +++ b/libpurple/util.c Tue Oct 09 23:09:05 2007 +0000 @@ -2548,15 +2548,14 @@ filename_full = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", user_dir, filename); - ret = purple_util_write_data_to_file_absolute(filename_full, - data,size); + ret = purple_util_write_data_to_file_absolute(filename_full, data, size); g_free(filename_full); return ret; } gboolean -purple_util_write_data_to_file_absolute(const char *filename_full, const char *data, size_t size) +purple_util_write_data_to_file_absolute(const char *filename_full, const char *data, gssize size) { gchar *filename_temp; FILE *file;
--- a/libpurple/util.h Tue Oct 09 23:01:11 2007 +0000 +++ b/libpurple/util.h Tue Oct 09 23:09:05 2007 +0000 @@ -607,7 +607,7 @@ * */ gboolean -purple_util_write_data_to_file_absolute(const char *filename_full, const char *data, size_t size); +purple_util_write_data_to_file_absolute(const char *filename_full, const char *data, gssize size); /** * Read the contents of a given file and parse the results into an