Module: wine Branch: master Commit: 2568e5ec65fa921bff6fb20068f080c2dc91a1f0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2568e5ec65fa921bff6fb20068...
Author: Hans Leidekker hans@codeweavers.com Date: Thu Feb 11 13:13:19 2010 +0100
msi: Make sure attrs variable is properly double nul-terminated in ITERATE_InstallODBCDataSource.
---
dlls/msi/action.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c index f9d4965..b949fc7 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -5031,8 +5031,8 @@ static UINT ITERATE_InstallODBCDataSource( MSIRECORD *rec, LPVOID param ) if (!attrs) return ERROR_OUTOFMEMORY;
- sprintfW(attrs, attrs_fmt, desc); - attrs[len - 1] = '\0'; + len = sprintfW(attrs, attrs_fmt, desc); + attrs[len + 1] = 0;
if (!SQLConfigDataSourceW(NULL, request, driver, attrs)) {