[cpp-sp] branch maint-3.5 updated: SSPCPP-1014 - Extend escaping in strings
Scott Cantor
cantor.2 at osu.edu
Wed Sep 3 12:46:43 UTC 2025
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch maint-3.5
in repository cpp-sp.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=59e1e04edc7c651eb2f0983b5ffe35ef72fd2265
The following commit(s) were added to refs/heads/maint-3.5 by this push:
new 59e1e04e SSPCPP-1014 - Extend escaping in strings
59e1e04e is described below
commit 59e1e04edc7c651eb2f0983b5ffe35ef72fd2265
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Sep 3 08:45:54 2025 -0400
SSPCPP-1014 - Extend escaping in strings
---
odbc-store/odbc-store.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/odbc-store/odbc-store.cpp b/odbc-store/odbc-store.cpp
index 2316e95c..aae85204 100644
--- a/odbc-store/odbc-store.cpp
+++ b/odbc-store/odbc-store.cpp
@@ -255,9 +255,10 @@ namespace {
string m_copy;
public:
SQLString(const char* src) : m_src(src) {
- if (strchr(src, '\'')) {
+ if (strchr(src, '\\') || strchr(src, '\'')) {
m_copy = src;
- replace_all(m_copy, "'", "''");
+ replace_all(m_copy, "\\", "\\\\");
+ replace_all(m_copy, "'", "\\'");
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list