已开启
fix oracle DBD compile error in CVE-2026-34191 patch #41
fix oracle DBD compile error in CVE-2026-34191 patch #41
已开启
Funda Wang创建于 8月13日
2 个文件变更+13-9
@@ -2,7 +2,7 @@
2 2 
3Name: apr-util3Name: apr-util
4Version: 1.6.14Version: 1.6.1
5-Release: 165+Release: 17
6Summary: apr-util provides a number of helpful abstractions on top of APR.6Summary: apr-util provides a number of helpful abstractions on top of APR.
7License: ASL 2.07License: ASL 2.0
8URL: http://apr.apache.org8URL: http://apr.apache.org
@@ -130,6 +130,9 @@ make test
130%{_libdir}/%{name}-%{apuver}/apr_dbd_odbc*130%{_libdir}/%{name}-%{apuver}/apr_dbd_odbc*
131 131 
132%changelog132%changelog
133+* Wed Aug 12 2026 fundawang <fundawang@yeah.net> - 1.6.1-17
134+- fix oracle DBD compile error in CVE-2026-34191 patch
135+ 
133* Fri Aug 07 2026 fundawang <fundawang@yeah.net> - 1.6.1-16136* Fri Aug 07 2026 fundawang <fundawang@yeah.net> - 1.6.1-16
134- Fix CVE-2026-34502, CVE-2026-34501, CVE-2026-34191,137- Fix CVE-2026-34502, CVE-2026-34501, CVE-2026-34191,
135 CVE-2026-32327, CVE-2025-49506138 CVE-2026-32327, CVE-2025-49506
@@ -15,31 +15,32 @@ Reviewed By: covener, jorton, jfclere
15 15 
16git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.6.x@1936817 13f79535-47bb-0310-9956-ffa450edef6816git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.6.x@1936817 13f79535-47bb-0310-9956-ffa450edef68
17---17---
18- dbd/apr_dbd_oracle.c | 20 +++++++++++++++++++-18+ dbd/apr_dbd_oracle.c | 21 ++++++++++++++++++++-
19- 1 file changed, 19 insertions(+), 1 deletion(-)19+ 1 file changed, 20 insertions(+), 1 deletion(-)
20 20 
21diff --git a/dbd/apr_dbd_oracle.c b/dbd/apr_dbd_oracle.c21diff --git a/dbd/apr_dbd_oracle.c b/dbd/apr_dbd_oracle.c
22index ce4d8a6..6da5ee8 10064422index ce4d8a6..6da5ee8 100644
23--- a/dbd/apr_dbd_oracle.c23--- a/dbd/apr_dbd_oracle.c
24+++ b/dbd/apr_dbd_oracle.c24+++ b/dbd/apr_dbd_oracle.c
25-@@ -848,7 +848,25 @@ static int dbd_oracle_query(apr_dbd_t *sql, int *nrows, const char *query)25+@@ -848,7 +848,26 @@ static int dbd_oracle_query(apr_dbd_t *sql, int *nrows, const char *query)
26 static const char *dbd_oracle_escape(apr_pool_t *pool, const char *arg,26 static const char *dbd_oracle_escape(apr_pool_t *pool, const char *arg,
27 apr_dbd_t *sql)27 apr_dbd_t *sql)
28 {28 {
29- return arg; /* OCI has no concept of string escape */29- return arg; /* OCI has no concept of string escape */
30-+ char *newstr, *src, *dst, *sq;30++ char *newstr, *dst;
31++ const char *src, *sq;
31+ int qcount;32+ int qcount;
32+33+
33+ /* return the original if there are no single-quotes */34+ /* return the original if there are no single-quotes */
34-+ if (!(sq = strchr(s, '\'')))35++ if (!(sq = strchr(arg, '\'')))
35-+ return (char *)s;36++ return arg;
36+ /* count the single-quotes and allocate a new buffer */37+ /* count the single-quotes and allocate a new buffer */
37+ for (qcount = 1; (sq = strchr(sq + 1, '\'')); )38+ for (qcount = 1; (sq = strchr(sq + 1, '\'')); )
38+ qcount++;39+ qcount++;
39-+ newstr = apr_palloc(pool, strlen(s) + qcount + 1);40++ newstr = apr_palloc(pool, strlen(arg) + qcount + 1);
40+41+
41+ /* move chars, doubling all single-quotes */42+ /* move chars, doubling all single-quotes */
42-+ src = (char *)s;43++ src = arg;
43+ for (dst = newstr; *src; src++) {44+ for (dst = newstr; *src; src++) {
44+ if ((*dst++ = *src) == '\'')45+ if ((*dst++ = *src) == '\'')
45+ *dst++ = '\'';46+ *dst++ = '\'';