Re: ole32: Fix invalid memory access in storage32

2009-12-06 Thread Vincent Povirk
On Sun, Dec 6, 2009 at 8:12 AM, Huw Davies wrote: > By the way, in storage32.h the filename member of struct StorageBaseImpl is > declared as > WCHAR filename[DIRENTRY_NAME_BUFFER_LEN]; > shouldn't it be > WCHAR filename[DIRENTRY_NAME_MAX_LEN]; > ? > > Huw. I'm not sure. I think I copied it from

Re: ole32: Fix invalid memory access in storage32

2009-12-06 Thread Nathan Gallaher
On Sun, 6 Dec 2009, Huw Davies wrote: By the way, in storage32.h the filename member of struct StorageBaseImpl is declared as WCHAR filename[DIRENTRY_NAME_BUFFER_LEN]; shouldn't it be WCHAR filename[DIRENTRY_NAME_MAX_LEN]; ? Huw. Looking at it, I can't tell. Perhaps Vincent Povirk can expl

Re: ole32: Fix invalid memory access in storage32

2009-12-06 Thread Huw Davies
Nathan Gallaher wrote: In StorageImpl_construct(): For pwcsName strings shorter than DIRENTRY_NAME_BUFFER_LEN-1, an invalid read would be noted by valgrind as the memcpy wanders off the end of the string. Do the needful to calculate the required string length. By the way, in storage32.h the f