[Debian-zh-dev] Bug#774343: add Chinese description for Chinese maintainer (I believe this project is maintained by native Chinese speakers)

叶剑飞Victor yjf.victor at foxmail.com
Thu Jan 1 10:23:08 UTC 2015


包名: zhcon
版本号: 1:0.2.6-10
维护人员: Aron Xu
Bug: zhcon可执行文件启动失败。
项目: http://anonscm.debian.org/cgit/chinese/zhcon.git/
有bug的补丁: http://anonscm.debian.org/cgit/chinese/zhcon.git/commit/?id=c3237304f3dcfee82ccb44e18b015633a03f724e


Bug描述:
"0008-default-to-utf8.patch"补丁有bug,导致zhcon启动失败。请移除这个补丁.

Technical infomation:
维护人员Aron Xu误解了getopt_long函数的用法,导到如下代码

static struct option long_options[] = {
  { "help",    0, NULL, 'h' },
  { "version",    0, NULL, 'V' },
  { "utf8",    0, NULL, 1 },
  { "drv",    1, NULL, 0 },
  { NULL,    0, NULL, 0 }
};

造成在使用--utf8命令行参数的时候,getopt_long返回1,结果switch-case运行到了default标签中,并导致程序异常退出。

如果你不加上--utf8命令行参数,那么第247行的代码

if (strcmp (long_options[option_index].name, "utf8") == 0)

导致程序不能运行到if语句块中,结果导致没法设置UTF-8的locale。‍
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/chinese-developers/attachments/20150101/2bec2758/attachment.html>


More information about the Chinese-developers mailing list