diff --git a/README.en.md b/README.en.md deleted file mode 100644 index eb39659..0000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# transfig - -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index 0ac0d9d..0000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# transfig - -#### 介绍 -{**以下是码云平台说明,您可以替换此简介** -码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/fig2dev-3.2.6a-CVE-2017-16899.patch b/fig2dev-3.2.6a-CVE-2017-16899.patch new file mode 100644 index 0000000..7f3df37 --- /dev/null +++ b/fig2dev-3.2.6a-CVE-2017-16899.patch @@ -0,0 +1,38 @@ +diff -up fig2dev-3.2.6a/fig2dev/read.c.orig fig2dev-3.2.6a/fig2dev/read.c +--- fig2dev-3.2.6a/fig2dev/read.c.orig 2017-01-07 23:01:19.000000000 +0100 ++++ fig2dev-3.2.6a/fig2dev/read.c 2017-11-21 15:17:31.195643198 +0100 +@@ -1329,8 +1329,14 @@ read_textobject(FILE *fp) + | PSFONT_TEXT; + + /* keep the font number reasonable */ +- if (t->font > MAXFONT(t)) ++ if (t->font > MAXFONT(t)) { + t->font = MAXFONT(t); ++ } else if (t->font < 0 ) { ++ if (psfont_text(t) && t->font < -1) ++ t->font = -1; ++ else ++ t->font = 0; ++ } + fix_and_note_color(&t->color); + t->comments = attach_comments(); /* attach any comments */ + return t; +diff -up fig2dev-3.2.6a/fig2dev/read1_3.c.orig fig2dev-3.2.6a/fig2dev/read1_3.c +--- fig2dev-3.2.6a/fig2dev/read1_3.c.orig 2016-08-19 21:34:38.000000000 +0200 ++++ fig2dev-3.2.6a/fig2dev/read1_3.c 2017-11-21 15:17:31.196643206 +0100 +@@ -470,6 +470,15 @@ read_textobject(FILE *fp) + free((char*) t); + return(NULL); + } ++ /* keep the font number within valid range */ ++ if (t->font > MAXFONT(t)) { ++ t->font = MAXFONT(t); ++ } else if (t->font < 0 ) { ++ if (psfont_text(t) && t->font < -1) ++ t->font = -1; ++ else ++ t->font = 0; ++ } + (void)strcpy(t->cstring, buf); + if (t->size == 0) t->size = 18; + return(t); diff --git a/fig2dev-3.2.6a.tar.xz b/fig2dev-3.2.6a.tar.xz new file mode 100644 index 0000000..f65c72d Binary files /dev/null and b/fig2dev-3.2.6a.tar.xz differ diff --git a/transfig.spec b/transfig.spec new file mode 100644 index 0000000..e11f060 --- /dev/null +++ b/transfig.spec @@ -0,0 +1,53 @@ +Name: transfig +Summary: Utility for converting FIG files (made by xfig) to other formats +Version: 3.2.6a +Release: 6 +Epoch: 1 +License: MIT +URL: https://sourceforge.net/projects/mcj/ + +Source0: http://downloads.sourceforge.net/mcj/fig2dev-%{version}.tar.xz + +Patch1: fig2dev-3.2.6a-CVE-2017-16899.patch + +Requires: netpbm-progs ghostscript bc + +BuildRequires: gcc libpng-devel libjpeg-devel libXpm-devel + +%description +The transfig utility creates a makefile which translates FIG (created +by xfig) or PIC figures into a specified LaTeX graphics language (for +example, PostScript(TM)). Transfig is used to create TeX documents +which are portable (i.e., they can be printed in a wide variety of +environments). + +Install transfig if you need a utility for translating FIG or PIC +figures into certain graphics languages. + +%package_help + +%prep +%autosetup -p1 -n fig2dev-%{version} + +%build +%configure --enable-transfig +%make_build + +%install +%make_install + +%files +%{_bindir}/%{name} +%{_bindir}/fig2* +%{_bindir}/pic2tpic +%{_datadir}/fig2dev/i18n/*.ps +%{_datadir}/fig2dev/bitmaps/*.bmp + +%files help +%doc %{name}/doc/manual.pdf +%{_mandir}/man1/*.1.gz +%{_datadir}/fig2dev/rgb.txt + +%changelog +* Tue Dec 3 2019 caomeng - 1:3.2.6a-6 +- Package init \ No newline at end of file