Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
7f3faffc
Commit
7f3faffc
authored
Mar 02, 2009
by
James Hawkins
Committed by
Alexandre Julliard
Mar 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Don't allow nested quotes in SQL queries.
parent
e821f9d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
20 deletions
+6
-20
db.c
dlls/msi/tests/db.c
+4
-13
tokenize.c
dlls/msi/tokenize.c
+2
-7
No files found.
dlls/msi/tests/db.c
View file @
7f3faffc
...
...
@@ -5257,10 +5257,7 @@ static void test_quotes(void)
query
=
"INSERT INTO `Table` ( `A` ) VALUES ( 'This is a ''string'' ok' )"
;
r
=
run_query
(
hdb
,
0
,
query
);
todo_wine
{
ok
(
r
==
ERROR_BAD_QUERY_SYNTAX
,
"Expected ERROR_BAD_QUERY_SYNTAX, got %d
\n
"
,
r
);
}
ok
(
r
==
ERROR_BAD_QUERY_SYNTAX
,
"Expected ERROR_BAD_QUERY_SYNTAX, got %d
\n
"
,
r
);
query
=
"INSERT INTO `Table` ( `A` ) VALUES ( 'This is a '''string''' ok' )"
;
r
=
run_query
(
hdb
,
0
,
query
);
...
...
@@ -5287,19 +5284,13 @@ static void test_quotes(void)
size
=
MAX_PATH
;
r
=
MsiRecordGetString
(
hrec
,
1
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
!
lstrcmp
(
buf
,
"This is a
\"
string
\"
ok"
),
"Expected
\"
This is a
\"
string
\"
ok
\"
, got %s
\n
"
,
buf
);
}
ok
(
!
lstrcmp
(
buf
,
"This is a
\"
string
\"
ok"
),
"Expected
\"
This is a
\"
string
\"
ok
\"
, got %s
\n
"
,
buf
);
MsiCloseHandle
(
hrec
);
r
=
MsiViewFetch
(
hview
,
&
hrec
);
todo_wine
{
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"Expected ERROR_NO_MORE_ITEMS, got %d
\n
"
,
r
);
}
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"Expected ERROR_NO_MORE_ITEMS, got %d
\n
"
,
r
);
MsiViewClose
(
hview
);
MsiCloseHandle
(
hview
);
...
...
dlls/msi/tokenize.c
View file @
7f3faffc
...
...
@@ -254,13 +254,8 @@ int sqliteGetToken(const WCHAR *z, int *tokenType){
case
'`'
:
case
'\''
:
{
int
delim
=
z
[
0
];
for
(
i
=
1
;
z
[
i
];
i
++
){
if
(
z
[
i
]
==
delim
){
if
(
z
[
i
+
1
]
==
delim
){
i
++
;
}
else
{
break
;
}
}
if
(
z
[
i
]
==
delim
)
break
;
}
if
(
z
[
i
]
)
i
++
;
if
(
delim
==
'`'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment