[dia/dia-0-97] Bug 633430 - Memory corruption when exporting to Xfig
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia/dia-0-97] Bug 633430 - Memory corruption when exporting to Xfig
- Date: Fri, 7 Jan 2011 12:19:07 +0000 (UTC)
commit 25d153cf07a7c8ef49d0c8b2ba185c96ac1f7f6a
Author: Hans Breuer <hans breuer org>
Date: Fri Oct 29 19:43:49 2010 +0200
Bug 633430 - Memory corruption when exporting to Xfig
(figText) : the escaping of backslash was not considered in new
string calculation.
plug-ins/xfig/xfig-export.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/xfig/xfig-export.c b/plug-ins/xfig/xfig-export.c
index cbccb97..63179b4 100644
--- a/plug-ins/xfig/xfig-export.c
+++ b/plug-ins/xfig/xfig-export.c
@@ -416,6 +416,8 @@ figText(XfigRenderer *renderer, const guchar *text)
for (i = 0; i < len; i++) {
if (text[i] > 127) {
newlen += 3;
+ } else if ('\\'==text[i]) {
+ newlen += 1;
}
}
returntext = g_malloc(sizeof(char)*(newlen+1));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]