summaryrefslogtreecommitdiff
path: root/community-staging/dia/dia-overflow-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community-staging/dia/dia-overflow-fix.patch')
-rw-r--r--community-staging/dia/dia-overflow-fix.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/community-staging/dia/dia-overflow-fix.patch b/community-staging/dia/dia-overflow-fix.patch
new file mode 100644
index 000000000..a6e64f3c6
--- /dev/null
+++ b/community-staging/dia/dia-overflow-fix.patch
@@ -0,0 +1,28 @@
+diff -wbBur dia-0.97.1/plug-ins/xfig/xfig-export.c dia-0.97.1.my/plug-ins/xfig/xfig-export.c
+--- dia-0.97.1/plug-ins/xfig/xfig-export.c 2009-11-07 17:28:34.000000000 +0300
++++ dia-0.97.1.my/plug-ins/xfig/xfig-export.c 2010-11-15 17:44:05.640896280 +0300
+@@ -417,6 +417,9 @@
+ if (text[i] > 127) {
+ newlen += 3;
+ }
++ if (text[i] == '\\') {
++ newlen += 1;
++ }
+ }
+ returntext = g_malloc(sizeof(char)*(newlen+1));
+ j = 0;
+@@ -1085,10 +1088,10 @@
+ figtext = figText(renderer, (unsigned char *) text);
+ /* xfig texts are specials */
+ fprintf(renderer->file, "4 %d %d %d 0 %d %s 0.0 6 0.0 0.0 %d %d %s\\001\n",
+- figAlignment(renderer, alignment),
+- figColor(renderer, color),
+- figDepth(renderer),
+- figFont(renderer),
++ (int)figAlignment(renderer, alignment),
++ (int)figColor(renderer, color),
++ (int)figDepth(renderer),
++ (int)figFont(renderer),
+ xfig_dtostr(d_buf, figFontSize(renderer)),
+ (int)figCoord(renderer, pos->x),
+ (int)figCoord(renderer, pos->y),