From 4444a04ece4c02a7bd51e8c75623f22dc12d882b Mon Sep 17 00:00:00 2001
From: Sutou Kouhei <kou@clear-code.com>
Date: Sun, 2 Jun 2024 16:59:16 +0900
Subject: [PATCH] Add missing encode for custom term

CVE: CVE-2024-41123

Upstream-Status: Backport [https://github.com/ruby/rexml/commit/4444a04ece4c02a7bd51e8c75623f22dc12d882b]

Signed-off-by: Divya Chellam <divya.chellam@windriver.com>
---
 .bundle/gems/rexml-3.2.5/lib/rexml/source.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb b/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb
index 08a035c..7be430a 100644
--- a/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb
+++ b/.bundle/gems/rexml-3.2.5/lib/rexml/source.rb
@@ -160,6 +160,7 @@ module REXML
     end
 
     def read(term = nil)
+      term = encode(term) if term
       begin
         @scanner << readline(term)
         true
@@ -171,6 +172,7 @@ module REXML
 
     def read_until(term)
       pattern = Regexp.union(term)
+      term = encode(term)
       data = []
       begin
         until str = @scanner.scan_until(pattern)
-- 
2.40.0

