Module: wine Branch: master Commit: 94892721ec0c917cf9700d4090f02ce4176a617d URL: http://source.winehq.org/git/wine.git/?a=commit;h=94892721ec0c917cf9700d4090...
Author: Hans Leidekker hans@codeweavers.com Date: Thu Oct 5 11:04:37 2017 +0200
wbemprox: Avoid an invalid write when there are no forwards in the route table (Valgrind).
Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wbemprox/builtin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 73d93a0..93bea52 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -2070,7 +2070,7 @@ static enum fill_status fill_ip4routetable( struct table *table, const struct ex heap_free( forwards ); return FILL_STATUS_FAILED; } - if (!resize_table( table, forwards->dwNumEntries, sizeof(*rec) )) + if (!resize_table( table, max(forwards->dwNumEntries, 1), sizeof(*rec) )) { heap_free( forwards ); return FILL_STATUS_FAILED;