diff --git a/mujs-1.2.0-stack-exhaustion.patch b/mujs-1.2.0-stack-exhaustion.patch deleted file mode 100644 index 04973df..0000000 --- a/mujs-1.2.0-stack-exhaustion.patch +++ /dev/null @@ -1,89 +0,0 @@ -diff -Pdpru mujs-1.2.0.orig/jsdump.c mujs-1.2.0/jsdump.c ---- mujs-1.2.0.orig/jsdump.c 2021-12-08 14:56:12.000000000 +0300 -+++ mujs-1.2.0/jsdump.c 2022-05-18 18:37:44.522227643 +0300 -@@ -682,11 +682,13 @@ static void pstmlist(int d, js_Ast *list - void jsP_dumpsyntax(js_State *J, js_Ast *prog, int dominify) - { - minify = dominify; -- if (prog->type == AST_LIST) -- pstmlist(-1, prog); -- else { -- pstm(0, prog); -- nl(); -+ if (prog) { -+ if (prog->type == AST_LIST) -+ pstmlist(-1, prog); -+ else { -+ pstm(0, prog); -+ nl(); -+ } - } - if (minify > 1) - putchar('\n'); -@@ -768,11 +770,13 @@ static void sblock(int d, js_Ast *list) - void jsP_dumplist(js_State *J, js_Ast *prog) - { - minify = 0; -- if (prog->type == AST_LIST) -- sblock(0, prog); -- else -- snode(0, prog); -- nl(); -+ if (prog) { -+ if (prog->type == AST_LIST) -+ sblock(0, prog); -+ else -+ snode(0, prog); -+ nl(); -+ } - } - - /* Compiled code */ -diff -Pdpru mujs-1.2.0.orig/regexp.c mujs-1.2.0/regexp.c ---- mujs-1.2.0.orig/regexp.c 2021-12-08 14:56:12.000000000 +0300 -+++ mujs-1.2.0/regexp.c 2022-05-18 18:32:24.114001044 +0300 -@@ -622,25 +622,26 @@ struct Reinst { - Reinst *y; - }; - --static int count(struct cstate *g, Renode *node) -+static int count(struct cstate *g, Renode *node, int depth) - { - int min, max, n; - if (!node) return 0; -+ if (++depth > REG_MAXREC) die(g, "stack overflow"); - switch (node->type) { - default: return 1; -- case P_CAT: return count(g, node->x) + count(g, node->y); -- case P_ALT: return count(g, node->x) + count(g, node->y) + 2; -+ case P_CAT: return count(g, node->x, depth) + count(g, node->y, depth); -+ case P_ALT: return count(g, node->x, depth) + count(g, node->y, depth) + 2; - case P_REP: - min = node->m; - max = node->n; -- if (min == max) n = count(g, node->x) * min; -- else if (max < REPINF) n = count(g, node->x) * max + (max - min); -- else n = count(g, node->x) * (min + 1) + 2; -+ if (min == max) n = count(g, node->x, depth) * min; -+ else if (max < REPINF) n = count(g, node->x, depth) * max + (max - min); -+ else n = count(g, node->x, depth) * (min + 1) + 2; - if (n < 0 || n > REG_MAXPROG) die(g, "program too large"); - return n; -- case P_PAR: return count(g, node->x) + 2; -- case P_PLA: return count(g, node->x) + 2; -- case P_NLA: return count(g, node->x) + 2; -+ case P_PAR: return count(g, node->x, depth) + 2; -+ case P_PLA: return count(g, node->x, depth) + 2; -+ case P_NLA: return count(g, node->x, depth) + 2; - } - } - -@@ -903,7 +904,7 @@ Reprog *regcompx(void *(*alloc)(void *ct - putchar('\n'); - #endif - -- n = 6 + count(&g, node); -+ n = 6 + count(&g, node, 0); - if (n < 0 || n > REG_MAXPROG) - die(&g, "program too large"); - diff --git a/mujs-1.2.0.tar.xz b/mujs-1.2.0.tar.xz deleted file mode 100644 index 94555e1..0000000 --- a/mujs-1.2.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:66976d1e06a352754a2342af73d1aecbb53cc7cdae2b68cda013b7ddcf923233 -size 99108 diff --git a/mujs-1.3.2.tar.xz b/mujs-1.3.2.tar.xz new file mode 100644 index 0000000..87e41b8 --- /dev/null +++ b/mujs-1.3.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4886593fc688b0cdccd31e5ecbe5afe7ad1bee23aa69e667b871afd5dfc640c3 +size 100076 diff --git a/mujs.changes b/mujs.changes index 1dababf..364475f 100644 --- a/mujs.changes +++ b/mujs.changes @@ -1,3 +1,35 @@ +------------------------------------------------------------------- +Sat Jan 14 11:41:55 UTC 2023 - ecsos + +- Update to 1.3.2 + * https://git.ghostscript.com/?p=mujs.git;a=log;h=refs/tags/1.3.2 + * 1.3.2 patch release for UAF bug fix. + * Bug 706057: Fix use-after-free in getOwnPropertyDescriptor. + * Set length of output array Array.prototype.map. +- Update to 1.3.1 + * https://git.ghostscript.com/?p=mujs.git;a=log;h=refs/tags/1.3.1 + * Make a patch release for important iterator bug fix. + * Issue #166: Use special iterator for string and array indices. + * Enable choice of library version for shell + * Use $(@D) instead of $(dir $@) +- Update to 1.3.0 + * https://git.ghostscript.com/?p=mujs.git;a=log;h=refs/tags/1.3.0 + * Avoid freeing buffer twice in case of error. + * Fast path for "simple" arrays. + * Bug 705775: Fix double fclose in pretty-printing tool. + * Makefile: fix parallel builds + * Guard state initialization with try to avoid panic in initialization. + * Add js_isbooleanobject and js_isdateobject functions. + * Issue #161: Cope with empty programs in mujs-pp. + * Issue #161: Don't fclose a FILE that is NULL. + * Issue #162: Check stack overflow during regexp compilation. + * Bug 705052: Don't use private STACK/TOP macros in jsstate.c + * Add "console" object to mujs shell. + * Issue #156: Fix check for duplicate formal parameters when strict. + * Some minor optimizations to Ap_join. + * array join: avoid strcat, speedup from O(N^2) to O(N) +- Drop mujs-1.2.0-stack-exhaustion.patch because now in upstream. + ------------------------------------------------------------------- Wed May 18 15:45:51 UTC 2022 - Илья Индиго diff --git a/mujs.spec b/mujs.spec index 63d2ac9..b6db793 100644 --- a/mujs.spec +++ b/mujs.spec @@ -1,7 +1,7 @@ # # spec file for package mujs # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,14 +17,13 @@ Name: mujs -Version: 1.2.0 +Version: 1.3.2 Release: 0 Summary: An embeddable Javascript interpreter License: AGPL-3.0-or-later Group: Development/Languages/C and C++ URL: https://mujs.com Source0: https://mujs.com/downloads/%{name}-%{version}.tar.xz -Patch0: %{name}-1.2.0-stack-exhaustion.patch BuildRequires: pkgconfig BuildRequires: pkgconfig(readline)