[vlc-commits] UAC: offsetof only needs to know the field name
Rafaël Carré
git at videolan.org
Tue Nov 26 10:53:30 CET 2013
vlc/vlc-2.1 | branch: master | Rafaël Carré <funman at videolan.org> | Mon Nov 18 13:39:27 2013 +0100| [55fe270c8a53e0e97e4f0f7c54f9223955bc9e27] | committer: Jean-Baptiste Kempf
UAC: offsetof only needs to know the field name
Don't specify the (variable) size
(cherry picked from commit ffff393ec1421aa7ff00cb5fb024d6fbee931fd4)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=55fe270c8a53e0e97e4f0f7c54f9223955bc9e27
---
extras/package/win32/NSIS/UAC/uac.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/extras/package/win32/NSIS/UAC/uac.cpp b/extras/package/win32/NSIS/UAC/uac.cpp
index b35c47a..5f25f4f 100644
--- a/extras/package/win32/NSIS/UAC/uac.cpp
+++ b/extras/package/win32/NSIS/UAC/uac.cpp
@@ -360,7 +360,7 @@ DWORD SyncVars(HWND hwndNSIS)
if (!g.UseIPC)return NO_ERROR;
g.NSISStrLen=NSIS::StrSize;
TRACEF("SyncVars: g.NSISStrLen=%d\n",g.NSISStrLen);ASSERT(g.NSISStrLen>10);
- DWORD cbStruct=FIELD_OFFSET(IPC_SYNCVAR,buf[g.NSISStrLen+1]);
+ DWORD cbStruct=FIELD_OFFSET(IPC_SYNCVAR,buf);
pSV=(IPC_SYNCVAR*)MemAlloc(cbStruct);
if (!pSV)
goto die_GLE;
@@ -503,7 +503,7 @@ void HandleExecExport(bool CreateProc,bool Wait,HWND&hwndNSIS,int&StrSize,NSISCH
cch+=lstrlen(pSIParams->text)+1;
cch+=lstrlen(pSIWorkDir->text)+1;
if (pSIVerb)cch+=lstrlen(pSIVerb->text)+1;
- cbStruct=FIELD_OFFSET( IPC_SHEXEC, buf[cch*sizeof(TCHAR)] );
+ cbStruct=FIELD_OFFSET( IPC_SHEXEC, buf );
pISE=(IPC_SHEXEC*)NSIS::MemAlloc(cbStruct);
if (!pISE)ec=GetLastError();
if (!ec)
More information about the vlc-commits
mailing list