diff options
| author | Pjotr Prins | 2026-04-03 09:12:33 +0200 |
|---|---|---|
| committer | Pjotr Prins | 2026-04-03 09:12:33 +0200 |
| commit | 19f7f7235cb9501008c5661b821a5efacef917ed (patch) | |
| tree | 978c9ac9954ba281d404eba8ed011352f5ed3861 /contrib | |
| parent | 0bf4af9c23ca5a1a34c9fa85ed18b5136113046a (diff) | |
| download | genecup-19f7f7235cb9501008c5661b821a5efacef917ed.tar.gz | |
Patch (edirect) to avoid panic during indexing
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/patches/edirect-xml-bounds-check.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/contrib/patches/edirect-xml-bounds-check.patch b/contrib/patches/edirect-xml-bounds-check.patch new file mode 100644 index 0000000..7e369ca --- /dev/null +++ b/contrib/patches/edirect-xml-bounds-check.patch @@ -0,0 +1,36 @@ +--- a/eutils/xml.go 2026-01-08 20:01:51.000000000 +0000 ++++ b/eutils/xml.go 2026-04-03 06:53:30.494928480 +0000 +@@ -1791,14 +1791,23 @@ + + // at start of end tag + idx++ ++ if idx >= txtlen { ++ return NOTAG, NONE, "", "", idx ++ } + start = idx + ch = text[idx] + // expect legal first character of element + if inFirst[ch] { + idx++ ++ if idx >= txtlen { ++ return NOTAG, NONE, "", "", idx ++ } + ch = text[idx] + for inElement[ch] { + idx++ ++ if idx >= txtlen { ++ return NOTAG, NONE, "", "", idx ++ } + ch = text[idx] + } + str := text[start:idx] +@@ -1806,6 +1815,9 @@ + // skip past unexpected blanks + for inBlank[ch] { + idx++ ++ if idx >= txtlen { ++ return NOTAG, NONE, "", "", idx ++ } + ch = text[idx] + } + if ch != '>' { |
