Nathan Gallaher : ole32: Fix invalid memory access in storage32.
Module: wine Branch: master Commit: de239d86fdf61fe1e09bde2aed4b4eb8cb45d49a URL: http://source.winehq.org/git/wine.git/?a=commit;h=de239d86fdf61fe1e09bde2aed... Author: Nathan Gallaher <ngallaher(a)deepthought.org> Date: Sun Dec 6 08:30:06 2009 -0500 ole32: Fix invalid memory access in storage32. --- dlls/ole32/storage32.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index f54bfdf..3263221 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -2280,9 +2280,7 @@ static HRESULT StorageImpl_Construct( goto end; } strcpyW(This->pwcsName, pwcsName); - - memcpy(This->base.filename, pwcsName, DIRENTRY_NAME_BUFFER_LEN-1); - This->base.filename[DIRENTRY_NAME_BUFFER_LEN-1] = 0; + lstrcpynW(This->base.filename, pwcsName, DIRENTRY_NAME_BUFFER_LEN); } /*
participants (1)
-
Alexandre Julliard