已开启
fix oracle DBD compile error in CVE-2026-34191 patch #41
Funda Wang创建于 8月13日
fix oracle DBD compile error in CVE-2026-34191 patch #41
已开启
共 2 个文件变更+13-9
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | Name: apr-util | 3 | Name: apr-util |
| 4 | Version: 1.6.1 | 4 | Version: 1.6.1 |
| 5 | -Release: 16 | 5 | +Release: 17 |
| 6 | Summary: apr-util provides a number of helpful abstractions on top of APR. | 6 | Summary: apr-util provides a number of helpful abstractions on top of APR. |
| 7 | License: ASL 2.0 | 7 | License: ASL 2.0 |
| 8 | URL: http://apr.apache.org | 8 | URL: 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 | %changelog | 132 | %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-16 | 136 | * 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-49506 | 138 | CVE-2026-32327, CVE-2025-49506 |
| @@ -15,31 +15,32 @@ Reviewed By: covener, jorton, jfclere | |||
| 15 | 15 | ||
| 16 | git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.6.x@1936817 13f79535-47bb-0310-9956-ffa450edef68 | 16 | git-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 | ||
| 21 | diff --git a/dbd/apr_dbd_oracle.c b/dbd/apr_dbd_oracle.c | 21 | diff --git a/dbd/apr_dbd_oracle.c b/dbd/apr_dbd_oracle.c |
| 22 | index ce4d8a6..6da5ee8 100644 | 22 | index ce4d8a6..6da5ee8 100644 |
| 23 | --- a/dbd/apr_dbd_oracle.c | 23 | --- a/dbd/apr_dbd_oracle.c |
| 24 | +++ b/dbd/apr_dbd_oracle.c | 24 | +++ 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++ = '\''; |