Module: wine Branch: master Commit: 2127f72f79ea3be59bddf369427b4e448e31f9b7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2127f72f79ea3be59bddf36942...
Author: Gerald Pfeifer gerald@pfeifer.com Date: Mon Aug 31 18:05:57 2015 +0200
quartz: Replace four occurrences of 1 << 31 by 1u << 31 to avoid shift overflow.
---
dlls/quartz/avisplit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/quartz/avisplit.c b/dlls/quartz/avisplit.c index ccb4cec..6059511 100644 --- a/dlls/quartz/avisplit.c +++ b/dlls/quartz/avisplit.c @@ -203,7 +203,7 @@ static HRESULT AVISplitter_next_request(AVISplitterImpl *This, DWORD streamnumbe ++stream->index_next; }
- rtSampleStop = rtSampleStart + MEDIATIME_FROM_BYTES(entry->dwSize & ~(1 << 31)); + rtSampleStop = rtSampleStart + MEDIATIME_FROM_BYTES(entry->dwSize & ~(1u << 31));
TRACE("offset(%u) size(%u)\n", (DWORD)BYTES_FROM_MEDIATIME(rtSampleStart), (DWORD)BYTES_FROM_MEDIATIME(rtSampleStop - rtSampleStart)); } @@ -596,7 +596,7 @@ static HRESULT AVISplitter_ProcessIndex(AVISplitterImpl *This, AVISTDINDEX **ind BOOL keyframe = !(pIndex->aIndex[x].dwSize >> 31); DWORDLONG offset = pIndex->qwBaseOffset + pIndex->aIndex[x].dwOffset; TRACE("dwOffset: %x%08x\n", (DWORD)(offset >> 32), (DWORD)offset); - TRACE("dwSize: %u\n", (pIndex->aIndex[x].dwSize & ~(1<<31))); + TRACE("dwSize: %u\n", (pIndex->aIndex[x].dwSize & ~(1u << 31))); TRACE("Frame is a keyframe: %s\n", keyframe ? "yes" : "no"); }
@@ -994,7 +994,7 @@ static HRESULT AVISplitter_InitializeStreams(AVISplitterImpl *This)
for (z = 0; z < stream->stdindex[y]->nEntriesInUse; ++z) { - UINT len = stream->stdindex[y]->aIndex[z].dwSize & ~(1 << 31); + UINT len = stream->stdindex[y]->aIndex[z].dwSize & ~(1u << 31); frames += len / stream->streamheader.dwSampleSize + !!(len % stream->streamheader.dwSampleSize); } } @@ -1342,7 +1342,7 @@ static HRESULT WINAPI AVISplitter_seek(IMediaSeeking *iface) { if (stream->streamheader.dwSampleSize) { - ULONG len = stream->stdindex[y]->aIndex[z].dwSize & ~(1 << 31); + ULONG len = stream->stdindex[y]->aIndex[z].dwSize & ~(1u << 31); ULONG size = stream->streamheader.dwSampleSize;
pin->dwSamplesProcessed += len / size;