[gimp/tito: 13/50] fixed malloc bugs



commit 61afbcc3403e1ff24b7c6823ee65ee9660432314
Author: Srihari <ssvz visishta net>
Date:   Tue Apr 17 08:28:12 2012 +0530

    fixed malloc bugs

 app/dialogs/tito-dialog.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/app/dialogs/tito-dialog.c b/app/dialogs/tito-dialog.c
index e8de412..e2f7599 100644
--- a/app/dialogs/tito-dialog.c
+++ b/app/dialogs/tito-dialog.c
@@ -978,13 +978,12 @@ gboolean
 initializer(void)
 {
   int i=0;
-  //initialize history_file_path
   if(first_time)
   {
-    history_file_path= g_new(gchar, strlen(gimp_sysconf_directory()));
+    history_file_path= g_new(gchar, 1024);
     strcpy(history_file_path,(gchar*)gimp_sysconf_directory());
     
-    preference_file_path= g_new(gchar,strlen(gimp_sysconf_directory()));
+    preference_file_path= g_new(gchar,1024);
     strcpy(preference_file_path,(gchar*)gimp_sysconf_directory());
     
     strcat(history_file_path,"/history_tito");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]