summaryrefslogtreecommitdiff
path: root/graphics/cinepaint/files/patch-app__menus.c
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2013-05-21 05:43:22 +0000
committerMartin Wilke <miwi@FreeBSD.org>2013-05-21 05:43:22 +0000
commitf507c057f9541a1210f6329e45fb348a42fe77d3 (patch)
treebed4502e44e6d0479f0bd5abc50691d5e9e6c3fd /graphics/cinepaint/files/patch-app__menus.c
parentUsing GNU make to build this port now, because people reporting various (diff)
- Update to 1.0.4
PR: 178595 Submitted by: Ports Fury
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);
+ }