im.pidgin.pidgin: a976c1dbb1135583dc67c67af14aa684fd4e18ee

datallah at pidgin.im datallah at pidgin.im
Tue Oct 9 19:51:25 EDT 2007


-----------------------------------------------------------------
Revision: a976c1dbb1135583dc67c67af14aa684fd4e18ee
Ancestor: 1095e0c294d15e95c8909d270748c5253226bfe6
Author: datallah at pidgin.im
Date: 2007-10-09T23:09:05
Branch: im.pidgin.pidgin

Modified files:
        libpurple/util.c libpurple/util.h

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- libpurple/util.c	1587dab3bb3e194dc1639793f7e7ed80fbb7ec16
+++ libpurple/util.c	0d6a7ceb17774c519eafeb4f8ed824667a8fe331
@@ -2548,15 +2548,14 @@ purple_util_write_data_to_file(const cha
 
 	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;
============================================================
--- libpurple/util.h	a4c51623a9a6ccdbed65ae17f8cf9d6f73541218
+++ libpurple/util.h	b442b1700aeece6f1f6678fde481ea534404557d
@@ -607,7 +607,7 @@ gboolean
  *
  */
 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


More information about the Commits mailing list