summaryrefslogtreecommitdiff
path: root/graphics/cinepaint/files/patch-app__menus.c
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/cinepaint/files/patch-app__menus.c')
-rw-r--r--graphics/cinepaint/files/patch-app__menus.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/graphics/cinepaint/files/patch-app__menus.c b/graphics/cinepaint/files/patch-app__menus.c
new file mode 100644
index 000000000000..815843f66478
--- /dev/null
+++ b/graphics/cinepaint/files/patch-app__menus.c
@@ -0,0 +1,25 @@
+--- app/menus.c.orig
++++ app/menus.c
+@@ -1597,7 +1597,7 @@
+ char*
+ menu_entry_translate (const char* entry)
+ {
+- char *text = (char*) calloc (1024, sizeof(char)),
++ char *text = (char*) calloc (sizeof(char), 1024),
+ *word = 0;
+ const char *tmp = 0;
+
+@@ -1647,11 +1647,11 @@
+ // resize memory
+ if(strlen(text))
+ {
+- word = (char*) calloc( strlen(text) + 1, sizeof(char) );
++ word = (char*) calloc( sizeof(char), strlen(text) + 4 );
+ memcpy( word, text, strlen( text ) + 1 );
+ free (text);
+ return word;
+ }
+ else
+- return (char*) calloc(1,sizeof(char));
++ return (char*) calloc(sizeof(char),1);
+ }