Date: Wed, 5 Aug 2020 10:07:44 +0000 (UTC) From: =?UTF-8?Q?Stefan_E=c3=9fer?= <se@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r363897 - in vendor/bc/dist: . locales src Message-ID: <202008051007.075A7iZB035982@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: se Date: Wed Aug 5 10:07:43 2020 New Revision: 363897 URL: https://svnweb.freebsd.org/changeset/base/363897 Log: Upgrade to version 3.1.5 This version fixes a bug that only occurs when with chinese locale settings. Modified: vendor/bc/dist/Makefile.in vendor/bc/dist/NEWS.md vendor/bc/dist/locales/zh_CN.GB18030.msg vendor/bc/dist/locales/zh_CN.GB2312.msg vendor/bc/dist/locales/zh_CN.GBK.msg vendor/bc/dist/locales/zh_CN.UTF-8.msg vendor/bc/dist/locales/zh_CN.eucCN.msg vendor/bc/dist/src/program.c vendor/bc/dist/src/vm.c Modified: vendor/bc/dist/Makefile.in ============================================================================== --- vendor/bc/dist/Makefile.in Wed Aug 5 10:06:53 2020 (r363896) +++ vendor/bc/dist/Makefile.in Wed Aug 5 10:07:43 2020 (r363897) @@ -29,7 +29,7 @@ # .POSIX: -VERSION = 3.1.4 +VERSION = 3.1.5 SRC = %%SRC%% OBJ = %%OBJ%% Modified: vendor/bc/dist/NEWS.md ============================================================================== --- vendor/bc/dist/NEWS.md Wed Aug 5 10:06:53 2020 (r363896) +++ vendor/bc/dist/NEWS.md Wed Aug 5 10:07:43 2020 (r363897) @@ -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: vendor/bc/dist/locales/zh_CN.GB18030.msg ============================================================================== Binary file (source and/or target). No diff available. Modified: vendor/bc/dist/locales/zh_CN.GB2312.msg ============================================================================== Binary file (source and/or target). No diff available. Modified: vendor/bc/dist/locales/zh_CN.GBK.msg ============================================================================== Binary file (source and/or target). No diff available. Modified: vendor/bc/dist/locales/zh_CN.UTF-8.msg ============================================================================== Binary file (source and/or target). No diff available. Modified: vendor/bc/dist/locales/zh_CN.eucCN.msg ============================================================================== Binary file (source and/or target). No diff available. Modified: vendor/bc/dist/src/program.c ============================================================================== --- vendor/bc/dist/src/program.c Wed Aug 5 10:06:53 2020 (r363896) +++ vendor/bc/dist/src/program.c Wed Aug 5 10:07:43 2020 (r363897) @@ -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: vendor/bc/dist/src/vm.c ============================================================================== --- vendor/bc/dist/src/vm.c Wed Aug 5 10:06:53 2020 (r363896) +++ vendor/bc/dist/src/vm.c Wed Aug 5 10:07:43 2020 (r363897) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008051007.075A7iZB035982>