Hans Leidekker : wbemprox: Avoid a crash on file or directory queries with an empty WHERE clause.
Alexandre Julliard
julliard at winehq.org
Wed Aug 28 14:03:08 CDT 2013
Module: wine
Branch: master
Commit: 7da04aab6d0166005beb776f2135707fc57d716e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7da04aab6d0166005beb776f2135707fc57d716e
Author: Hans Leidekker <hans at codeweavers.com>
Date: Wed Aug 28 09:49:05 2013 +0200
wbemprox: Avoid a crash on file or directory queries with an empty WHERE clause.
---
dlls/wbemprox/builtin.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index 9e2369a..d310704 100644
--- a/dlls/wbemprox/builtin.c
+++ b/dlls/wbemprox/builtin.c
@@ -1085,9 +1085,12 @@ static BOOL seen_dir( struct dirstack *dirstack, const WCHAR *path )
/* optimize queries of the form WHERE Name='...' [OR Name='...']* */
static UINT seed_dirs( struct dirstack *dirstack, const struct expr *cond, WCHAR root, UINT *count )
{
- const struct expr *left = cond->u.expr.left, *right = cond->u.expr.right;
+ const struct expr *left, *right;
- if (cond->type != EXPR_COMPLEX) return *count = 0;
+ if (!cond || cond->type != EXPR_COMPLEX) return *count = 0;
+
+ left = cond->u.expr.left;
+ right = cond->u.expr.right;
if (cond->u.expr.op == OP_EQ)
{
UINT len;
More information about the wine-cvs
mailing list