svn commit: r363915 - in head/contrib/bc: . locales src
Stefan Eßer
se at FreeBSD.org
Wed Aug 5 15:20:08 UTC 2020
Author: se
Date: Wed Aug 5 15:20:07 2020
New Revision: 363915
URL: https://svnweb.freebsd.org/changeset/base/363915
Log:
Upgrade to version 3.1.5
This version fixes some entries in the chinese message catalogs which could
lead to program crashes when used.
Modified:
head/contrib/bc/Makefile.in
head/contrib/bc/NEWS.md
head/contrib/bc/locales/zh_CN.GB18030.msg
head/contrib/bc/locales/zh_CN.GB2312.msg
head/contrib/bc/locales/zh_CN.GBK.msg
head/contrib/bc/locales/zh_CN.UTF-8.msg
head/contrib/bc/locales/zh_CN.eucCN.msg
head/contrib/bc/src/program.c
head/contrib/bc/src/vm.c
Directory Properties:
head/contrib/bc/ (props changed)
Modified: head/contrib/bc/Makefile.in
==============================================================================
--- head/contrib/bc/Makefile.in Wed Aug 5 14:42:45 2020 (r363914)
+++ head/contrib/bc/Makefile.in Wed Aug 5 15:20:07 2020 (r363915)
@@ -29,7 +29,7 @@
#
.POSIX:
-VERSION = 3.1.4
+VERSION = 3.1.5
SRC = %%SRC%%
OBJ = %%OBJ%%
Modified: head/contrib/bc/NEWS.md
==============================================================================
--- head/contrib/bc/NEWS.md Wed Aug 5 14:42:45 2020 (r363914)
+++ head/contrib/bc/NEWS.md Wed Aug 5 15:20:07 2020 (r363915)
@@ -1,5 +1,13 @@
# News
+## 3.1.5
+
+This is a production release that fixes the Chinese locales (which caused `bc`
+to crash) and a crash caused by `bc` executing code when it should not have been
+able to.
+
+***ALL USERS SHOULD UPGRADE.***
+
## 3.1.4
This is a production release that fixes one bug, changes two behaviors, and
Modified: head/contrib/bc/locales/zh_CN.GB18030.msg
==============================================================================
Binary file (source and/or target). No diff available.
Modified: head/contrib/bc/locales/zh_CN.GB2312.msg
==============================================================================
Binary file (source and/or target). No diff available.
Modified: head/contrib/bc/locales/zh_CN.GBK.msg
==============================================================================
Binary file (source and/or target). No diff available.
Modified: head/contrib/bc/locales/zh_CN.UTF-8.msg
==============================================================================
Binary file (source and/or target). No diff available.
Modified: head/contrib/bc/locales/zh_CN.eucCN.msg
==============================================================================
Binary file (source and/or target). No diff available.
Modified: head/contrib/bc/src/program.c
==============================================================================
--- head/contrib/bc/src/program.c Wed Aug 5 14:42:45 2020 (r363914)
+++ head/contrib/bc/src/program.c Wed Aug 5 15:20:07 2020 (r363915)
@@ -1271,11 +1271,12 @@ static void bc_program_divmod(BcProgram *p) {
BcNum *n1, *n2;
size_t req;
+ bc_vec_expand(&p->results, p->results.len + 2);
+
+ // We don't need to update the pointer because
+ // the capacity is enough due to the line above.
res2 = bc_program_prepResult(p);
res = bc_program_prepResult(p);
-
- // Update the pointer, just in case.
- res2 = bc_vec_item_rev(&p->results, 1);
bc_program_binOpPrep(p, &opd1, &n1, &opd2, &n2, 2);
Modified: head/contrib/bc/src/vm.c
==============================================================================
--- head/contrib/bc/src/vm.c Wed Aug 5 14:42:45 2020 (r363914)
+++ head/contrib/bc/src/vm.c Wed Aug 5 15:20:07 2020 (r363915)
@@ -464,7 +464,7 @@ static void bc_vm_process(const char *text) {
while (BC_PARSE_CAN_PARSE(vm.prs)) vm.parse(&vm.prs);
- bc_program_exec(&vm.prog);
+ if(BC_IS_DC || !BC_PARSE_NO_EXEC(&vm.prs)) bc_program_exec(&vm.prog);
assert(BC_IS_DC || vm.prog.results.len == 0);
More information about the svn-src-all
mailing list