leptris 1.9.426.0-aarch64-linux → 1.9.427.0-aarch64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +10 -1
- data/SUPPORTED_MINORS +1 -0
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/native_3_1.so +0 -0
- data/lib/leptris/xml/native_3_2.so +0 -0
- data/lib/leptris/xml/native_3_4.so +0 -0
- data/lib/leptris/xml/native_4_0.so +0 -0
- data/lib/libleptris.so +0 -0
- data/vendor-src/README.md +1 -1
- data/vendor-src/libleptris/CHANGELOG.md +22 -0
- data/vendor-src/libleptris/CMakeLists.txt +1 -1
- data/vendor-src/libleptris/src/leptris/rng/validate.c +284 -40
- data/vendor-src/libleptris/src/leptris/xpath/vm.c +18 -9
- data/vendor-src/libleptris/src/leptris/xpath/xpath_compiled.c +13 -1
- data/vendor-src/libleptris/src/leptris/xslt/xslt_parse.c +20 -0
- data/vendor-src/libleptris/test/differential/rs-runner/Cargo.toml +1 -1
- data/vendor-src/libleptris/test/fuzz/corpus/xslt_astcache_uaf_session.bin +0 -0
- data/vendor-src/libleptris/test/fuzz/corpus/xslt_carrier_number_uaf.bin +1 -0
- data/vendor-src/libleptris/test/fuzz/corpus/xslt_dispatch_union_dup_hbo.bin +0 -0
- data/vendor-src/libleptris/test/fuzz/corpus/xslt_uaf_predicate_layer.bin +0 -0
- data/vendor-src/libleptris/test/rng/test_rng.cpp +179 -0
- data/vendor-src/libleptris/vcpkg.json +1 -1
- metadata +11 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: becf2b1daf96d01b25aec74eeecc83dc0b6a21308334f726278c21e3abc12075
|
|
4
|
+
data.tar.gz: a8ae9e5cb5b8714056495e2bae98a4428ef7e086514ac4ad4515ddc1bfc2f4ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dcac4f797b2b795cd8b42d6d194b837ac4724870b0d29f310fe4d7f52706d94c39998bc2dd3707d325cc1ee2e1c36dbb7fa08c40176b2830e62fc1fe8a8c244c
|
|
7
|
+
data.tar.gz: ecd9fff5da6579465419691bc1ef54962786e59d7fa9f4b1c3d4c21c5c396f07dd80cee9a4c38a8c7a63fa4dd9f61b37bcaf299015b6cfd61b6658c562053c5a
|
data/Rakefile
CHANGED
|
@@ -8,7 +8,16 @@ RSpec::Core::RakeTask.new(:spec)
|
|
|
8
8
|
# Pin for `rake compile` and the platform-gem builds. Keep in lockstep
|
|
9
9
|
# with .github/workflows/build.yml (which calls `rake compile`) and the
|
|
10
10
|
# CHANGELOG when libleptris releases.
|
|
11
|
-
LIBLEPTRIS_VERSION = "1.9.
|
|
11
|
+
LIBLEPTRIS_VERSION = "1.9.427"
|
|
12
|
+
|
|
13
|
+
# THE SSOT for the per-minor native bundle list (ruby#645): one line,
|
|
14
|
+
# space-separated, consumed by the Rakefile, the per-minor builder's
|
|
15
|
+
# callers, and the release workflow's container loops + publication
|
|
16
|
+
# gates (`cat SUPPORTED_MINORS`). A minor joins here and every
|
|
17
|
+
# platform's matrix covers it; it leaves here and every gate stops
|
|
18
|
+
# requiring it. NO OTHER COPY of this list may exist in this repo.
|
|
19
|
+
SUPPORTED_RUBY_MINORS = File.read("SUPPORTED_MINORS").split.freeze
|
|
20
|
+
SUPPORTED_RUBY_MINORS_US = SUPPORTED_RUBY_MINORS.map { |v| v.tr(".", "_") }.freeze
|
|
12
21
|
# Vendored alongside libleptris for fn:normalize-unicode (TODO
|
|
13
22
|
# .restructure/20): built per platform with a RELOCATABLE @rpath
|
|
14
23
|
# install name, loaded by ffi.rb before libleptris so the
|
data/SUPPORTED_MINORS
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.1 3.2 3.3 3.4 4.0
|
data/lib/leptris/version.rb
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/libleptris.so
CHANGED
|
Binary file
|
data/vendor-src/README.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.9.427] - 2026-11-18
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
The fuzz-lane's memory-safety wave plus the OpenMath2 RELAX NG
|
|
8
|
+
conformance wave — seven fixes in two days, every one from a
|
|
9
|
+
standalone-reproducible input.
|
|
10
|
+
|
|
11
|
+
- **xpath: the bytecode compiled from the wrong cache graph** (SOTA C1 finding 6, the last edge). Same expression text can hold different parses in different cache records — a compiled handle may carry the graveyard's graph (its insert pinned a pre-eviction parse) while the live slot holds a fresher one. The eval path compiled bytecode from the handle's graph but stored it under the expression key, so the slot's later holders ran bytecode whose constants pointed into a graph only the old handle kept alive, and the handle's teardown freed it under them. The bytecode now compiles from **the slot's own graph**; the crash regime went from 90-seconds-to-UAF to 2.2M clean runs.
|
|
12
|
+
- **xslt: the dispatch key lists dedupe their templates** (SOTA C1 finding 7). `match="…|t|…|t"` names the same leaf twice; every alternative appended the same template to the same dispatch key, running `k->n` past the allocation (heap-buffer-overflow at stylesheet parse). Both append sites dedupe per key — which also stops a template dispatching twice per node.
|
|
13
|
+
- **xpath: the union transfers ownership per side** (SOTA C1 finding 8). The union concatenated one leg when the other operand was empty but gated the #514 ownership transfer on both legs — a carrier nodeset unioned with an empty operand left the result sharing an owned node the owning operand freed at cleanup. The transfer is per side.
|
|
14
|
+
- **rng: wrapper bodies match as implicit groups** (#2078). `optional`/`zeroOrMore`/`oneOrMore` matched only their first child; the XML form flattens multi-child wrapper bodies as siblings (Jing §4.10) — openmath2.rng's OMATP `(a,b)+` rejected `<a/><b/>` while claiming to expect `b`. The three wrappers walk the whole child chain; `oneOrMore` repeats it whole.
|
|
15
|
+
- **rng: a choice of attributes selects exactly one branch as a set** (#2079). Per-attribute existence over the union of branches admitted `dec` AND `hex` together on OMF while the required pass demanded both. The attribute walkers carry a selection map (one branch per attr-choice, refs expanded, bounded search); a branch walks as a single node — the choice's children are siblings, and the old list walk crossed branches.
|
|
16
|
+
- **rng: `<data>` content lexes through the XSD builtin library** (#2080). `data_lexical_ok` handled only `integer`; base64Binary validated `not-base64!!!`. Known XSD types route through the engine's builtin lexers — one shared lexical space with the XSD validator (base64 padding/remainder rules, hex even-length; unknown types stay permissive per the RNG fallback contract).
|
|
17
|
+
|
|
18
|
+
### Tooling
|
|
19
|
+
|
|
20
|
+
- The C1 lane's corpus now carries every pinned input from all eight findings (four UAF/SEGV classes, one overflow, two RNG conformance shapes); the nightly's grammar-aware generator regenerates 200 deep structures per run over them.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
3
25
|
## [1.9.426] - 2026-11-17
|
|
4
26
|
|
|
5
27
|
### Fixed
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
*/
|
|
11
11
|
#include "rng_internal.h"
|
|
12
12
|
#include "../dom/element.h"
|
|
13
|
+
/* #2080: <data> content lexes through the engine's XSD builtin
|
|
14
|
+
* library — one shared lexical space with the XSD validator. */
|
|
15
|
+
#include "../xsd/xsd_internal.h"
|
|
13
16
|
#include <stdarg.h>
|
|
14
17
|
#include <stdlib.h>
|
|
15
18
|
#include <string.h>
|
|
@@ -126,6 +129,16 @@ static int data_lexical_ok(const RngPattern* data, const char* t) {
|
|
|
126
129
|
for (; *q; q++)
|
|
127
130
|
if (!isdigit((unsigned char)*q)) return 0;
|
|
128
131
|
}
|
|
132
|
+
/* leptris#2080: <data> content lexes through the XSD builtin
|
|
133
|
+
* library — the engine's own lexical space (base64Binary admitted
|
|
134
|
+
* "not-base64!!!" before this; the datatypeLibrary default is the
|
|
135
|
+
* XSD datatypes). Unknown types stay permissive. */
|
|
136
|
+
if (data->datatype && *data->datatype) {
|
|
137
|
+
char qname[64];
|
|
138
|
+
snprintf(qname, sizeof(qname), "xs:%s", data->datatype);
|
|
139
|
+
if (xsd_builtin_known(qname))
|
|
140
|
+
return xsd_builtin_valid(qname, t) == 1;
|
|
141
|
+
}
|
|
129
142
|
return 1;
|
|
130
143
|
}
|
|
131
144
|
|
|
@@ -313,13 +326,134 @@ static int list_consumes_attr(RngVal* v, RngPattern* head,
|
|
|
313
326
|
return 0;
|
|
314
327
|
}
|
|
315
328
|
|
|
316
|
-
/*
|
|
329
|
+
/* ---- ruby#2079: whole-branch attribute-choice selection ----------
|
|
330
|
+
* A <choice> of attribute branches must pick EXACTLY ONE branch as
|
|
331
|
+
* a set: per-attribute existence over the union of branches let
|
|
332
|
+
* attributes from different branches combine (openmath2.rng's OMF
|
|
333
|
+
* admitted dec AND hex). The selection map assigns one branch per
|
|
334
|
+
* attr-choice node; the walkers consult it. Unassigned choices keep
|
|
335
|
+
* the union semantics (collection contexts). */
|
|
336
|
+
#define RNG_ATTR_SEL_MAX 16
|
|
337
|
+
#define RNG_ATTR_SEARCH_MAX_DEPTH 12
|
|
338
|
+
|
|
339
|
+
typedef struct {
|
|
340
|
+
RngPattern* choice;
|
|
341
|
+
RngPattern* branch;
|
|
342
|
+
} AttrSelEntry;
|
|
343
|
+
typedef struct {
|
|
344
|
+
AttrSelEntry e[RNG_ATTR_SEL_MAX];
|
|
345
|
+
size_t n;
|
|
346
|
+
} AttrSel;
|
|
347
|
+
|
|
348
|
+
static int check_required_list_sel(RngVal* v, RngPattern* head,
|
|
349
|
+
LeptrisElement e, const AttrSel* sel);
|
|
317
350
|
static int check_required_list(RngVal* v, RngPattern* head,
|
|
318
351
|
LeptrisElement e) {
|
|
352
|
+
return check_required_list_sel(v, head, e, NULL);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
static RngPattern* attr_sel_branch(const AttrSel* sel,
|
|
356
|
+
const RngPattern* choice) {
|
|
357
|
+
if (!sel) return NULL;
|
|
358
|
+
for (size_t i = 0; i < sel->n; i++)
|
|
359
|
+
if (sel->e[i].choice == choice) return sel->e[i].branch;
|
|
360
|
+
return NULL;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
static int list_consumes_attr_sel(RngVal* v, RngPattern* head,
|
|
364
|
+
LeptrisElement e, const char* name,
|
|
365
|
+
const AttrSel* sel);
|
|
366
|
+
static int pattern_consumes_attr_sel(RngVal* v, RngPattern* p,
|
|
367
|
+
LeptrisElement e, const char* name,
|
|
368
|
+
const AttrSel* sel) {
|
|
369
|
+
if (sel) {
|
|
370
|
+
RngPattern* b = attr_sel_branch(sel, p);
|
|
371
|
+
if (p->kind == RNG_CHOICE && b)
|
|
372
|
+
return list_consumes_attr_sel(v, b, e, name, sel);
|
|
373
|
+
if (p->kind == RNG_CHOICE && !b && p->first_child &&
|
|
374
|
+
p->first_child->kind == RNG_ATTRIBUTE &&
|
|
375
|
+
!p->first_child->next) {
|
|
376
|
+
/* A single-attribute choice with no assignment is
|
|
377
|
+
* decided by the attribute itself (its own union). */
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
return list_consumes_attr_sel(v, p->first_child, e, name, sel);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
static int node_consumes_attr_sel(RngVal* v, RngPattern* c,
|
|
384
|
+
LeptrisElement e, const char* name,
|
|
385
|
+
const AttrSel* sel);
|
|
386
|
+
static int list_consumes_attr_sel(RngVal* v, RngPattern* head,
|
|
387
|
+
LeptrisElement e, const char* name,
|
|
388
|
+
const AttrSel* sel) {
|
|
319
389
|
for (RngPattern* c = head; c; c = c->next) {
|
|
390
|
+
if (node_consumes_attr_sel(v, c, e, name, sel)) return 1;
|
|
391
|
+
}
|
|
392
|
+
return 0;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/* ONE node — a branch selection must not walk the sibling chain
|
|
396
|
+
* (ruby#2079: the choice's children are siblings; a branch walk that
|
|
397
|
+
* follows ->next crosses into the OTHER branches). */
|
|
398
|
+
static int node_consumes_attr_sel(RngVal* v, RngPattern* c,
|
|
399
|
+
LeptrisElement e, const char* name,
|
|
400
|
+
const AttrSel* sel) {
|
|
401
|
+
{
|
|
402
|
+
switch (c->kind) {
|
|
403
|
+
case RNG_ATTRIBUTE:
|
|
404
|
+
if (c->any_name) {
|
|
405
|
+
const char* got = leptris_element_attribute(e, name);
|
|
406
|
+
return attr_content_satisfied(v, c, got ? got : "");
|
|
407
|
+
}
|
|
408
|
+
if (c->name && strcmp(c->name, name) == 0) {
|
|
409
|
+
const char* got = leptris_element_attribute(e, name);
|
|
410
|
+
return attr_content_satisfied(v, c, got ? got : "");
|
|
411
|
+
}
|
|
412
|
+
break;
|
|
413
|
+
case RNG_OPTIONAL: case RNG_ZERO_OR_MORE:
|
|
414
|
+
case RNG_GROUP: case RNG_INTERLEAVE:
|
|
415
|
+
if (pattern_consumes_attr_sel(v, c, e, name, sel)) return 1;
|
|
416
|
+
break;
|
|
417
|
+
case RNG_CHOICE: {
|
|
418
|
+
RngPattern* b = attr_sel_branch(sel, c);
|
|
419
|
+
if (b) {
|
|
420
|
+
if (node_consumes_attr_sel(v, b, e, name, sel))
|
|
421
|
+
return 1;
|
|
422
|
+
break;
|
|
423
|
+
}
|
|
424
|
+
/* Unassigned: union semantics (collection contexts). */
|
|
425
|
+
if (pattern_consumes_attr(v, c, e, name)) return 1;
|
|
426
|
+
break;
|
|
427
|
+
}
|
|
428
|
+
case RNG_REF: {
|
|
429
|
+
RngDefine* d = find_define(v->g, c->name);
|
|
430
|
+
if (d && d->body &&
|
|
431
|
+
list_consumes_attr_sel(v, d->body, e, name, sel))
|
|
432
|
+
return 1;
|
|
433
|
+
break;
|
|
434
|
+
}
|
|
435
|
+
default: break;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
return 0;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
static int check_required_node_sel(RngVal* v, RngPattern* c,
|
|
442
|
+
LeptrisElement e, const AttrSel* sel);
|
|
443
|
+
static int check_required_list_sel(RngVal* v, RngPattern* head,
|
|
444
|
+
LeptrisElement e, const AttrSel* sel) {
|
|
445
|
+
for (RngPattern* c = head; c; c = c->next) {
|
|
446
|
+
if (!check_required_node_sel(v, c, e, sel)) return 0;
|
|
447
|
+
}
|
|
448
|
+
return 1;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
static int check_required_node_sel(RngVal* v, RngPattern* c,
|
|
452
|
+
LeptrisElement e, const AttrSel* sel) {
|
|
453
|
+
{
|
|
320
454
|
switch (c->kind) {
|
|
321
455
|
case RNG_ATTRIBUTE: {
|
|
322
|
-
if (c->any_name) break;
|
|
456
|
+
if (c->any_name) break;
|
|
323
457
|
const char* got = leptris_element_attribute(e, c->name);
|
|
324
458
|
if (!got) {
|
|
325
459
|
diag(v, LEPTRIS_DIAG_MISSING_REQUIRED_ATTR, e,
|
|
@@ -330,33 +464,121 @@ static int check_required_list(RngVal* v, RngPattern* head,
|
|
|
330
464
|
break;
|
|
331
465
|
}
|
|
332
466
|
case RNG_GROUP: case RNG_INTERLEAVE: case RNG_ONE_OR_MORE:
|
|
333
|
-
if (!
|
|
467
|
+
if (!check_required_list_sel(v, c->first_child, e, sel))
|
|
468
|
+
return 0;
|
|
334
469
|
break;
|
|
335
470
|
case RNG_REF: {
|
|
336
|
-
/* #1164: a required attribute behind <ref> is as
|
|
337
|
-
* required as an inline one — metanorma bibdata
|
|
338
|
-
* schemas are ref'd attribute groups throughout */
|
|
339
471
|
RngDefine* d = find_define(v->g, c->name);
|
|
340
472
|
if (d && d->body &&
|
|
341
|
-
!
|
|
473
|
+
!check_required_list_sel(v, d->body, e, sel))
|
|
342
474
|
return 0;
|
|
343
475
|
break;
|
|
344
476
|
}
|
|
345
|
-
case RNG_CHOICE:
|
|
346
|
-
|
|
347
|
-
if (
|
|
477
|
+
case RNG_CHOICE: {
|
|
478
|
+
RngPattern* b = attr_sel_branch(sel, c);
|
|
479
|
+
if (b) {
|
|
480
|
+
if (!check_required_node_sel(v, b, e, sel)) return 0;
|
|
481
|
+
break;
|
|
482
|
+
}
|
|
483
|
+
int any_ok = 0;
|
|
484
|
+
for (RngPattern* alt = c->first_child; alt && !any_ok;
|
|
485
|
+
alt = alt->next) {
|
|
486
|
+
v->failed = 0;
|
|
487
|
+
v->err[0] = 0;
|
|
488
|
+
any_ok = check_required_list_sel(v, alt, e, sel);
|
|
489
|
+
}
|
|
490
|
+
if (!any_ok) return 0;
|
|
348
491
|
break;
|
|
492
|
+
}
|
|
349
493
|
default: break;
|
|
350
494
|
}
|
|
351
495
|
}
|
|
352
496
|
return 1;
|
|
353
497
|
}
|
|
354
498
|
|
|
355
|
-
|
|
356
|
-
|
|
499
|
+
/* Collect the attr-consuming CHOICE nodes through the content
|
|
500
|
+
* (refs expanded, depth-capped). */
|
|
501
|
+
static void collect_attr_choices(RngVal* v, RngPattern* p, int depth,
|
|
502
|
+
AttrSel* out) {
|
|
503
|
+
if (!p || depth > 24) return;
|
|
504
|
+
for (RngPattern* c = p->first_child; c; c = c->next) {
|
|
505
|
+
if (c->kind == RNG_CHOICE) {
|
|
506
|
+
int consumes = 0;
|
|
507
|
+
for (RngPattern* b = c->first_child; b && !consumes;
|
|
508
|
+
b = b->next)
|
|
509
|
+
if (b->kind == RNG_ATTRIBUTE) consumes = 1;
|
|
510
|
+
if (consumes && out->n < RNG_ATTR_SEL_MAX) {
|
|
511
|
+
out->e[out->n].choice = c;
|
|
512
|
+
out->e[out->n].branch = NULL;
|
|
513
|
+
out->n++;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
if (c->kind == RNG_REF) {
|
|
517
|
+
RngDefine* d = find_define(v->g, c->name);
|
|
518
|
+
if (d && d->body) collect_attr_choices(v, d->body, depth + 1, out);
|
|
519
|
+
continue;
|
|
520
|
+
}
|
|
521
|
+
collect_attr_choices(v, c, depth + 1, out);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
static int check_required_attrs_sel(RngVal* v, RngPattern* p,
|
|
526
|
+
LeptrisElement e, const AttrSel* sel) {
|
|
527
|
+
return check_required_list_sel(v, p->first_child, e, sel);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/* One candidate assignment: every instance attribute consumed, every
|
|
531
|
+
* requirement satisfied — under THIS selection. */
|
|
532
|
+
static int match_attrs_with_sel(RngVal* v, RngPattern* content,
|
|
533
|
+
LeptrisElement e, const AttrSel* sel) {
|
|
534
|
+
v->failed = 0;
|
|
535
|
+
v->err[0] = 0;
|
|
536
|
+
for (struct leptris_attribute* a =
|
|
537
|
+
leptris_element_get_first_attribute(e);
|
|
538
|
+
a; a = leptris_attr_next(a)) {
|
|
539
|
+
if (!pattern_consumes_attr_sel(v, content, e, attr_cname(a), sel))
|
|
540
|
+
return 0;
|
|
541
|
+
}
|
|
542
|
+
return check_required_attrs_sel(v, content, e, sel);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/* The bounded assignment search: one branch per attr-choice. */
|
|
546
|
+
static int attr_sel_search(RngVal* v, RngPattern* content,
|
|
547
|
+
LeptrisElement e, AttrSel* sel, int depth) {
|
|
548
|
+
if (depth > RNG_ATTR_SEARCH_MAX_DEPTH) return 0;
|
|
549
|
+
for (size_t i = 0; i < sel->n; i++) {
|
|
550
|
+
if (sel->e[i].branch) continue;
|
|
551
|
+
for (RngPattern* b = sel->e[i].choice->first_child; b;
|
|
552
|
+
b = b->next) {
|
|
553
|
+
sel->e[i].branch = b;
|
|
554
|
+
v->failed = 0;
|
|
555
|
+
v->err[0] = 0;
|
|
556
|
+
if (attr_sel_search(v, content, e, sel, depth + 1)) return 1;
|
|
557
|
+
sel->e[i].branch = NULL;
|
|
558
|
+
}
|
|
559
|
+
return 0;
|
|
560
|
+
}
|
|
561
|
+
return match_attrs_with_sel(v, content, e, sel);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
static int check_required_attrs(RngVal* v, RngPattern* p,
|
|
565
|
+
LeptrisElement e) {
|
|
566
|
+
return check_required_list_sel(v, p->first_child, e, NULL);
|
|
357
567
|
}
|
|
358
568
|
|
|
359
569
|
static int match_attrs(RngVal* v, RngPattern* content, LeptrisElement e) {
|
|
570
|
+
/* ruby#2079: attr-consuming choices exist → whole-branch
|
|
571
|
+
* selection search. Otherwise the union path is exact. */
|
|
572
|
+
AttrSel sel;
|
|
573
|
+
memset(&sel, 0, sizeof(sel));
|
|
574
|
+
collect_attr_choices(v, content, 0, &sel);
|
|
575
|
+
if (sel.n > 0) {
|
|
576
|
+
if (attr_sel_search(v, content, e, &sel, 0)) return 1;
|
|
577
|
+
diag(v, LEPTRIS_DIAG_ATTR_NOT_ALLOWED, e,
|
|
578
|
+
"attribute combination matches no branch of the "
|
|
579
|
+
"attribute choice", NULL);
|
|
580
|
+
return 0;
|
|
581
|
+
}
|
|
360
582
|
/* Every instance attribute must be consumed by the content. */
|
|
361
583
|
for (struct leptris_attribute* a = leptris_element_get_first_attribute(e);
|
|
362
584
|
a; a = leptris_attr_next(a)) {
|
|
@@ -492,44 +714,66 @@ static size_t match_seq(RngVal* v, RngPattern* p, LeptrisNodeRef* kids,
|
|
|
492
714
|
return i;
|
|
493
715
|
}
|
|
494
716
|
case RNG_OPTIONAL: {
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
717
|
+
/* ruby-adjacent leptris#2078: the XML form flattens a
|
|
718
|
+
* multi-child wrapper body as siblings — an implicit
|
|
719
|
+
* group (Jing §4.10). Walk the WHOLE child chain; the
|
|
720
|
+
* old first_child-only hand dropped every sibling past
|
|
721
|
+
* the first (openmath2.rng's OMATP). */
|
|
722
|
+
size_t i = idx;
|
|
723
|
+
for (RngPattern* c = p->first_child; c; c = c->next) {
|
|
724
|
+
i = match_seq(v, c, kids, n, i);
|
|
725
|
+
if (i == (size_t)-1) {
|
|
726
|
+
/* The branch is skippable: an inner mismatch is
|
|
727
|
+
* speculative, not a failure — clear the latch like
|
|
728
|
+
* ZERO_OR_MORE/CHOICE do, or the stuck failure
|
|
729
|
+
* poisons every later match (regression since the
|
|
730
|
+
* #878 vocabulary pass made silent mismatches
|
|
731
|
+
* loud; optional-omitted documents validated
|
|
732
|
+
* false). */
|
|
733
|
+
v->failed = 0;
|
|
734
|
+
v->err[0] = 0;
|
|
735
|
+
return idx;
|
|
736
|
+
}
|
|
507
737
|
}
|
|
508
|
-
return
|
|
738
|
+
return i;
|
|
509
739
|
}
|
|
510
740
|
case RNG_ZERO_OR_MORE: {
|
|
511
741
|
for (;;) {
|
|
512
|
-
size_t
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
742
|
+
size_t i = idx;
|
|
743
|
+
for (RngPattern* c = p->first_child; c; c = c->next) {
|
|
744
|
+
i = match_seq(v, c, kids, n, i);
|
|
745
|
+
if (i == (size_t)-1) {
|
|
746
|
+
v->failed = 0;
|
|
747
|
+
v->err[0] = 0;
|
|
748
|
+
return idx;
|
|
749
|
+
}
|
|
517
750
|
}
|
|
518
|
-
idx
|
|
751
|
+
if (i == idx) return idx;
|
|
752
|
+
idx = i;
|
|
519
753
|
}
|
|
520
754
|
}
|
|
521
755
|
case RNG_ONE_OR_MORE: {
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
756
|
+
/* First iteration: the whole implicit-group body must
|
|
757
|
+
* match (#2078). */
|
|
758
|
+
size_t i = idx;
|
|
759
|
+
for (RngPattern* c = p->first_child; c; c = c->next) {
|
|
760
|
+
i = match_seq(v, c, kids, n, i);
|
|
761
|
+
if (i == (size_t)-1) return (size_t)-1;
|
|
762
|
+
}
|
|
763
|
+
/* Subsequent iterations: repeat the body while it makes
|
|
764
|
+
* progress. */
|
|
525
765
|
for (;;) {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
766
|
+
size_t j = i;
|
|
767
|
+
for (RngPattern* c = p->first_child; c; c = c->next) {
|
|
768
|
+
j = match_seq(v, c, kids, n, j);
|
|
769
|
+
if (j == (size_t)-1) {
|
|
770
|
+
v->failed = 0;
|
|
771
|
+
v->err[0] = 0;
|
|
772
|
+
return i;
|
|
773
|
+
}
|
|
531
774
|
}
|
|
532
|
-
|
|
775
|
+
if (j == i) return i;
|
|
776
|
+
i = j;
|
|
533
777
|
}
|
|
534
778
|
}
|
|
535
779
|
case RNG_EMPTY:
|
|
@@ -1622,18 +1622,27 @@ static int vm_apply_binary_op(XPathVM* vm, XPathContext* ctx,
|
|
|
1622
1622
|
|
|
1623
1623
|
/* Issue #514: transfer synthetic-node ownership from
|
|
1624
1624
|
* the operands — see the twin fix in
|
|
1625
|
-
* evaluator_operators.c.
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1625
|
+
* evaluator_operators.c. PER SIDE (finding 8): the
|
|
1626
|
+
* concat above runs on one leg when the other is
|
|
1627
|
+
* empty (rn/ln NULL), and gating the transfer on
|
|
1628
|
+
* `ln && rn` left the result sharing an owned node
|
|
1629
|
+
* the owning operand still freed at cleanup — the
|
|
1630
|
+
* pushed result handed out disposed memory. */
|
|
1631
|
+
result->value.nodeset_value->owns_attributes =
|
|
1632
|
+
(ln ? ln->owns_attributes : 0) ||
|
|
1633
|
+
(rn ? rn->owns_attributes : 0);
|
|
1634
|
+
result->value.nodeset_value->owns_namespaces =
|
|
1635
|
+
(ln ? ln->owns_namespaces : 0) ||
|
|
1636
|
+
(rn ? rn->owns_namespaces : 0);
|
|
1637
|
+
result->value.nodeset_value->owns_synthetic_text =
|
|
1638
|
+
(ln ? ln->owns_synthetic_text : 0) ||
|
|
1639
|
+
(rn ? rn->owns_synthetic_text : 0);
|
|
1640
|
+
if (ln) {
|
|
1634
1641
|
ln->owns_attributes = 0;
|
|
1635
1642
|
ln->owns_namespaces = 0;
|
|
1636
1643
|
ln->owns_synthetic_text = 0;
|
|
1644
|
+
}
|
|
1645
|
+
if (rn) {
|
|
1637
1646
|
rn->owns_attributes = 0;
|
|
1638
1647
|
rn->owns_namespaces = 0;
|
|
1639
1648
|
rn->owns_synthetic_text = 0;
|
|
@@ -77,7 +77,19 @@ static struct leptris_xpath_result* compiled_eval_bc_pinned(
|
|
|
77
77
|
&ce);
|
|
78
78
|
LeptrisXPathBytecode* bc = hit ? ce.bc : NULL;
|
|
79
79
|
if (hit && !bc) {
|
|
80
|
-
|
|
80
|
+
/* Finding 6, the last edge: compile from THE SLOT'S graph
|
|
81
|
+
* (ce.ast), never from compiled->ast. Same expression text
|
|
82
|
+
* can have DIFFERENT parses in different records: this
|
|
83
|
+
* compiled handle may hold the graveyard's graph (its insert
|
|
84
|
+
* pinned a pre-eviction parse) while the live slot holds a
|
|
85
|
+
* fresher parse of the same text. Bytecode compiled from
|
|
86
|
+
* compiled->ast but STORED into the slot paired its constants
|
|
87
|
+
* with a graph the slot does not own — the slot's later
|
|
88
|
+
* holders ran bytecode whose constants pointed into a graph
|
|
89
|
+
* only the old handle kept alive, and the handle's teardown
|
|
90
|
+
* freed that graph under them (the nightly's UAF at
|
|
91
|
+
* evaluate_function_call_impl). */
|
|
92
|
+
bc = leptris_xpath_compile_ast(ce.ast);
|
|
81
93
|
if (bc) {
|
|
82
94
|
xpath_ast_cache_store_bc(compiled->expr,
|
|
83
95
|
compiled->expr_len, bc);
|
|
@@ -2012,6 +2012,15 @@ void xslt_sheet_build_dispatch(XsltStylesheet* sheet) {
|
|
|
2012
2012
|
n * sizeof(XsltTemplate*));
|
|
2013
2013
|
if (!k2->list) continue;
|
|
2014
2014
|
}
|
|
2015
|
+
/* Finding 7, the value-index twin: same
|
|
2016
|
+
* dedupe (a template can carry two identical
|
|
2017
|
+
* [@k='v'] alternatives). */
|
|
2018
|
+
{
|
|
2019
|
+
int dup = 0;
|
|
2020
|
+
for (size_t i = 0; i < k2->n && !dup; i++)
|
|
2021
|
+
dup = (k2->list[i] == t);
|
|
2022
|
+
if (dup) continue;
|
|
2023
|
+
}
|
|
2015
2024
|
k2->list[k2->n++] = t;
|
|
2016
2025
|
continue;
|
|
2017
2026
|
}
|
|
@@ -2042,6 +2051,17 @@ void xslt_sheet_build_dispatch(XsltStylesheet* sheet) {
|
|
|
2042
2051
|
n * sizeof(XsltTemplate*));
|
|
2043
2052
|
if (!k->list) continue;
|
|
2044
2053
|
}
|
|
2054
|
+
/* Finding 7 (the fuzzer's "a|…|t|…|t" unions): a
|
|
2055
|
+
* template can name the same leaf in SEVERAL
|
|
2056
|
+
* alternatives, and every append grew k->n past
|
|
2057
|
+
* the n-sized list. A template also must not be
|
|
2058
|
+
* dispatched twice per node — dedupe per key. */
|
|
2059
|
+
{
|
|
2060
|
+
int dup = 0;
|
|
2061
|
+
for (size_t i = 0; i < k->n && !dup; i++)
|
|
2062
|
+
dup = (k->list[i] == t);
|
|
2063
|
+
if (dup) continue;
|
|
2064
|
+
}
|
|
2045
2065
|
k->list[k->n++] = t;
|
|
2046
2066
|
}
|
|
2047
2067
|
if (has_other) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<xsl:stylesheet xion="1.0"><xsl:template match="/"><xsl:for-each select="item/r[@mode]-[lmerge-acast()]|6'deapply-templatund(nude(mr@ib))"/></xsl:template></xsl:stylesheet>
|
|
Binary file
|
|
@@ -1670,3 +1670,182 @@ TEST(Rng1709Shapes, AttributeChoiceWithTextBranchAcceptsAny) {
|
|
|
1670
1670
|
* definition here, but the harness shape keeps it simple — the
|
|
1671
1671
|
* enum hit and text hit are the contract under test. */
|
|
1672
1672
|
}
|
|
1673
|
+
|
|
1674
|
+
/* ---- leptris#2078: wrapper bodies are implicit groups ------------- */
|
|
1675
|
+
|
|
1676
|
+
TEST(Rng2078Wrappers, OneOrMoreOverMultiElementBody) {
|
|
1677
|
+
/* Jing §4.10: the XML form flattens a multi-child wrapper body as
|
|
1678
|
+
* siblings — an implicit group. match_seq handed the wrapper only
|
|
1679
|
+
* first_child, so the sibling chain past the first element was
|
|
1680
|
+
* never matched (openmath2.rng's OMATP shape). */
|
|
1681
|
+
const char* schema =
|
|
1682
|
+
"<element name=\"root\" xmlns=\"http://relaxng.org/ns/structure/1.0\">"
|
|
1683
|
+
"<oneOrMore>"
|
|
1684
|
+
"<element name=\"a\"><empty/></element>"
|
|
1685
|
+
"<element name=\"b\"><empty/></element>"
|
|
1686
|
+
"</oneOrMore></element>";
|
|
1687
|
+
LeptrisRelaxNG rng =
|
|
1688
|
+
leptris_rng_parse(schema, strlen(schema), nullptr);
|
|
1689
|
+
ASSERT_NE(rng, nullptr);
|
|
1690
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1691
|
+
LeptrisDocument d = leptris_parse_string(
|
|
1692
|
+
"<root><a/><b/></root>", strlen("<root><a/><b/></root>"), &st);
|
|
1693
|
+
ASSERT_NE(d, nullptr);
|
|
1694
|
+
EXPECT_EQ(leptris_rng_validate(rng, d), 1)
|
|
1695
|
+
<< "oneOrMore over an (a,b) body must accept <a/><b/>";
|
|
1696
|
+
leptris_document_free(d);
|
|
1697
|
+
d = leptris_parse_string(
|
|
1698
|
+
"<root><a/><b/><a/><b/></root>", 29, &st);
|
|
1699
|
+
ASSERT_NE(d, nullptr);
|
|
1700
|
+
EXPECT_EQ(leptris_rng_validate(rng, d), 1)
|
|
1701
|
+
<< "the repetition must cover the WHOLE body per iteration";
|
|
1702
|
+
leptris_document_free(d);
|
|
1703
|
+
d = leptris_parse_string("<root><a/></root>", 17, &st);
|
|
1704
|
+
ASSERT_NE(d, nullptr);
|
|
1705
|
+
EXPECT_EQ(leptris_rng_validate(rng, d), 0)
|
|
1706
|
+
<< "a half-iteration (a without b) must still reject";
|
|
1707
|
+
leptris_document_free(d);
|
|
1708
|
+
leptris_rng_free(rng);
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
TEST(Rng2078Wrappers, OptionalOverMultiElementBody) {
|
|
1712
|
+
const char* schema =
|
|
1713
|
+
"<element name=\"root\" xmlns=\"http://relaxng.org/ns/structure/1.0\">"
|
|
1714
|
+
"<optional>"
|
|
1715
|
+
"<element name=\"a\"><empty/></element>"
|
|
1716
|
+
"<element name=\"b\"><empty/></element>"
|
|
1717
|
+
"</optional></element>";
|
|
1718
|
+
LeptrisRelaxNG rng =
|
|
1719
|
+
leptris_rng_parse(schema, strlen(schema), nullptr);
|
|
1720
|
+
ASSERT_NE(rng, nullptr);
|
|
1721
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1722
|
+
/* present as a unit: accept; absent: accept; half-present: reject */
|
|
1723
|
+
const char* ok1 = "<root><a/><b/></root>";
|
|
1724
|
+
const char* ok2 = "<root/>";
|
|
1725
|
+
const char* bad = "<root><a/></root>";
|
|
1726
|
+
LeptrisDocument d = leptris_parse_string(ok1, strlen(ok1), &st);
|
|
1727
|
+
ASSERT_NE(d, nullptr);
|
|
1728
|
+
EXPECT_EQ(leptris_rng_validate(rng, d), 1);
|
|
1729
|
+
leptris_document_free(d);
|
|
1730
|
+
d = leptris_parse_string(ok2, strlen(ok2), &st);
|
|
1731
|
+
ASSERT_NE(d, nullptr);
|
|
1732
|
+
EXPECT_EQ(leptris_rng_validate(rng, d), 1);
|
|
1733
|
+
leptris_document_free(d);
|
|
1734
|
+
d = leptris_parse_string(bad, strlen(bad), &st);
|
|
1735
|
+
ASSERT_NE(d, nullptr);
|
|
1736
|
+
EXPECT_EQ(leptris_rng_validate(rng, d), 0);
|
|
1737
|
+
leptris_document_free(d);
|
|
1738
|
+
leptris_rng_free(rng);
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
TEST(Rng2078Wrappers, ZeroOrMoreOverMultiElementBody) {
|
|
1742
|
+
const char* schema =
|
|
1743
|
+
"<element name=\"root\" xmlns=\"http://relaxng.org/ns/structure/1.0\">"
|
|
1744
|
+
"<zeroOrMore>"
|
|
1745
|
+
"<element name=\"a\"><empty/></element>"
|
|
1746
|
+
"<element name=\"b\"><empty/></element>"
|
|
1747
|
+
"</zeroOrMore></element>";
|
|
1748
|
+
LeptrisRelaxNG rng =
|
|
1749
|
+
leptris_rng_parse(schema, strlen(schema), nullptr);
|
|
1750
|
+
ASSERT_NE(rng, nullptr);
|
|
1751
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1752
|
+
const char* doc1 = "<root><a/><b/><a/></root>"; /* trailing half: reject */
|
|
1753
|
+
LeptrisDocument d = leptris_parse_string(
|
|
1754
|
+
"<root><a/><b/></root>", strlen("<root><a/><b/></root>"), &st);
|
|
1755
|
+
ASSERT_NE(d, nullptr);
|
|
1756
|
+
EXPECT_EQ(leptris_rng_validate(rng, d), 1);
|
|
1757
|
+
leptris_document_free(d);
|
|
1758
|
+
d = leptris_parse_string(doc1, strlen(doc1), &st);
|
|
1759
|
+
ASSERT_NE(d, nullptr);
|
|
1760
|
+
EXPECT_EQ(leptris_rng_validate(rng, d), 0)
|
|
1761
|
+
<< "a whole-body iteration cannot end mid-body";
|
|
1762
|
+
leptris_document_free(d);
|
|
1763
|
+
leptris_rng_free(rng);
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
/* ---- leptris#2079: a choice of attributes is exclusive ------------ */
|
|
1767
|
+
|
|
1768
|
+
TEST(Rng2079AttrChoice, ExactlyOneBranchWins) {
|
|
1769
|
+
/* openmath2.rng's OMF: <choice> of dec(hex? no—double) and hex —
|
|
1770
|
+
* per-attribute existence over the union of branches admitted
|
|
1771
|
+
* BOTH at once; the choice must pick exactly one branch as a
|
|
1772
|
+
* set. */
|
|
1773
|
+
const char* schema =
|
|
1774
|
+
"<element name=\"OMF\" xmlns=\"http://relaxng.org/ns/structure/1.0\">"
|
|
1775
|
+
"<optional><attribute name=\"id\"><data type=\"string\"/></attribute></optional>"
|
|
1776
|
+
"<choice>"
|
|
1777
|
+
"<attribute name=\"dec\"><data type=\"double\"/></attribute>"
|
|
1778
|
+
"<attribute name=\"hex\"><data type=\"hexBinary\"/></attribute>"
|
|
1779
|
+
"</choice></element>";
|
|
1780
|
+
LeptrisRelaxNG rng =
|
|
1781
|
+
leptris_rng_parse(schema, strlen(schema), nullptr);
|
|
1782
|
+
ASSERT_NE(rng, nullptr);
|
|
1783
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1784
|
+
struct { const char* doc; int want; const char* why; } cases[] = {
|
|
1785
|
+
{"<OMF dec=\"0.5\"/>", 1, "dec alone: the dec branch"},
|
|
1786
|
+
{"<OMF hex=\"4142\"/>", 1, "hex alone (even-length hex): the hex branch"},
|
|
1787
|
+
{"<OMF dec=\"0.5\" hex=\"A\"/>", 0, /* also: A is invalid hexBinary */
|
|
1788
|
+
"both attributes: two branches at once must reject"},
|
|
1789
|
+
{"<OMF/>", 0, "neither: the choice is required"},
|
|
1790
|
+
{"<OMF id=\"x\" dec=\"0.5\"/>", 1,
|
|
1791
|
+
"an optional attr outside the choice rides along"},
|
|
1792
|
+
};
|
|
1793
|
+
for (auto& c : cases) {
|
|
1794
|
+
LeptrisDocument d = leptris_parse_string(c.doc, strlen(c.doc), &st);
|
|
1795
|
+
ASSERT_NE(d, nullptr) << c.doc;
|
|
1796
|
+
EXPECT_EQ(leptris_rng_validate(rng, d), c.want)
|
|
1797
|
+
<< c.why << " — doc: " << c.doc;
|
|
1798
|
+
leptris_document_free(d);
|
|
1799
|
+
}
|
|
1800
|
+
leptris_rng_free(rng);
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
/* ---- leptris#2080: <data> content lexes through the XSD builtins -- */
|
|
1804
|
+
|
|
1805
|
+
TEST(Rng2080Data, Base64BinaryLexes) {
|
|
1806
|
+
/* openmath2.rng's OMB: element content typed base64Binary must
|
|
1807
|
+
* actually lex — "not-base64!!!" validated before the dispatch
|
|
1808
|
+
* reached the engine's builtin lexers. */
|
|
1809
|
+
const char* schema =
|
|
1810
|
+
"<element name=\"OMB\" xmlns=\"http://relaxng.org/ns/structure/1.0\">"
|
|
1811
|
+
"<data type=\"base64Binary\"/></element>";
|
|
1812
|
+
LeptrisRelaxNG rng =
|
|
1813
|
+
leptris_rng_parse(schema, strlen(schema), nullptr);
|
|
1814
|
+
ASSERT_NE(rng, nullptr);
|
|
1815
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1816
|
+
struct { const char* doc; int want; } cases[] = {
|
|
1817
|
+
{"<OMB>not-base64!!!</OMB>", 0},
|
|
1818
|
+
{"<OMB>aGVsbG8=</OMB>", 1}, /* "hello" */
|
|
1819
|
+
{"<OMB>AB==</OMB>", 1}, /* padded */
|
|
1820
|
+
{"<OMB>A===</OMB>", 0}, /* over-padded */
|
|
1821
|
+
{"<OMB>AB</OMB>", 1}, /* unpadded 2 bytes */
|
|
1822
|
+
{"<OMB>ABC</OMB>", 1}, /* unpadded 3 chars: 2 bytes */ /* remainder 1 byte */
|
|
1823
|
+
};
|
|
1824
|
+
for (auto& c : cases) {
|
|
1825
|
+
LeptrisDocument d = leptris_parse_string(c.doc, strlen(c.doc), &st);
|
|
1826
|
+
ASSERT_NE(d, nullptr) << c.doc;
|
|
1827
|
+
EXPECT_EQ(leptris_rng_validate(rng, d), c.want)
|
|
1828
|
+
<< "doc: " << c.doc;
|
|
1829
|
+
leptris_document_free(d);
|
|
1830
|
+
}
|
|
1831
|
+
leptris_rng_free(rng);
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
TEST(Rng2080Data, HexBinaryLexes) {
|
|
1835
|
+
const char* schema =
|
|
1836
|
+
"<element name=\"H\" xmlns=\"http://relaxng.org/ns/structure/1.0\">"
|
|
1837
|
+
"<data type=\"hexBinary\"/></element>";
|
|
1838
|
+
LeptrisRelaxNG rng =
|
|
1839
|
+
leptris_rng_parse(schema, strlen(schema), nullptr);
|
|
1840
|
+
ASSERT_NE(rng, nullptr);
|
|
1841
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1842
|
+
LeptrisDocument d = leptris_parse_string("<H>zz</H>", strlen("<H>zz</H>"), &st);
|
|
1843
|
+
ASSERT_NE(d, nullptr);
|
|
1844
|
+
EXPECT_EQ(leptris_rng_validate(rng, d), 0);
|
|
1845
|
+
leptris_document_free(d);
|
|
1846
|
+
d = leptris_parse_string("<H>0A</H>", strlen("<H>0A</H>"), &st);
|
|
1847
|
+
ASSERT_NE(d, nullptr);
|
|
1848
|
+
EXPECT_EQ(leptris_rng_validate(rng, d), 1);
|
|
1849
|
+
leptris_document_free(d);
|
|
1850
|
+
leptris_rng_free(rng);
|
|
1851
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
|
|
3
3
|
"name": "leptris",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.427",
|
|
5
5
|
"description": "High-performance XML parser and XPath 1.0 engine in C (libleptris)",
|
|
6
6
|
"homepage": "https://github.com/leptris/leptris",
|
|
7
7
|
"license": "MIT",
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: leptris
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.9.
|
|
4
|
+
version: 1.9.427.0
|
|
5
5
|
platform: aarch64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ffi
|
|
@@ -69,6 +69,7 @@ files:
|
|
|
69
69
|
- LICENSE.md
|
|
70
70
|
- README.adoc
|
|
71
71
|
- Rakefile
|
|
72
|
+
- SUPPORTED_MINORS
|
|
72
73
|
- TODO.final/04-native-bundle-codesign-artifact-sync.md
|
|
73
74
|
- TODO.perf/01-ext-accelerated-default-reads.md
|
|
74
75
|
- TODO.perf/02-auto-enable-native-layer.md
|
|
@@ -170,7 +171,11 @@ files:
|
|
|
170
171
|
- lib/leptris/xml/iterparse.rb
|
|
171
172
|
- lib/leptris/xml/namespace.rb
|
|
172
173
|
- lib/leptris/xml/native.so
|
|
174
|
+
- lib/leptris/xml/native_3_1.so
|
|
175
|
+
- lib/leptris/xml/native_3_2.so
|
|
173
176
|
- lib/leptris/xml/native_3_3.so
|
|
177
|
+
- lib/leptris/xml/native_3_4.so
|
|
178
|
+
- lib/leptris/xml/native_4_0.so
|
|
174
179
|
- lib/leptris/xml/native_layer.rb
|
|
175
180
|
- lib/leptris/xml/node.rb
|
|
176
181
|
- lib/leptris/xml/node_set.rb
|
|
@@ -898,8 +903,12 @@ files:
|
|
|
898
903
|
- vendor-src/libleptris/test/fuzz/corpus/seed2
|
|
899
904
|
- vendor-src/libleptris/test/fuzz/corpus/xslt_astcache_uaf_fold.bin
|
|
900
905
|
- vendor-src/libleptris/test/fuzz/corpus/xslt_astcache_uaf_nightly.bin
|
|
906
|
+
- vendor-src/libleptris/test/fuzz/corpus/xslt_astcache_uaf_session.bin
|
|
907
|
+
- vendor-src/libleptris/test/fuzz/corpus/xslt_carrier_number_uaf.bin
|
|
908
|
+
- vendor-src/libleptris/test/fuzz/corpus/xslt_dispatch_union_dup_hbo.bin
|
|
901
909
|
- vendor-src/libleptris/test/fuzz/corpus/xslt_dyncall_nontext_callee_segv.xml
|
|
902
910
|
- vendor-src/libleptris/test/fuzz/corpus/xslt_empty_match_template_leak.xml
|
|
911
|
+
- vendor-src/libleptris/test/fuzz/corpus/xslt_uaf_predicate_layer.bin
|
|
903
912
|
- vendor-src/libleptris/test/fuzz/corpus/xslt_union_number_head_segv.xml
|
|
904
913
|
- vendor-src/libleptris/test/fuzz/fuzz_html.c
|
|
905
914
|
- vendor-src/libleptris/test/fuzz/fuzz_mutate.c
|