Commit 2a55b09b authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

directshow: Removed bad sizeof in copy/pasted code (Coverity).

parent 230f63c3
...@@ -173,7 +173,7 @@ static HRESULT WINAPI IDirectMusicBandImpl_IDirectMusicObject_SetDescriptor (LPD ...@@ -173,7 +173,7 @@ static HRESULT WINAPI IDirectMusicBandImpl_IDirectMusicObject_SetDescriptor (LPD
This->pDesc->ftDate = pDesc->ftDate; This->pDesc->ftDate = pDesc->ftDate;
if (pDesc->dwValidData & DMUS_OBJ_MEMORY) { if (pDesc->dwValidData & DMUS_OBJ_MEMORY) {
This->pDesc->llMemLength = pDesc->llMemLength; This->pDesc->llMemLength = pDesc->llMemLength;
memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); memcpy (This->pDesc->pbMemData, pDesc->pbMemData, pDesc->llMemLength);
} }
if (pDesc->dwValidData & DMUS_OBJ_STREAM) { if (pDesc->dwValidData & DMUS_OBJ_STREAM) {
/* according to MSDN, we copy the stream */ /* according to MSDN, we copy the stream */
......
...@@ -163,7 +163,7 @@ static HRESULT WINAPI IDirectMusicChordMapImpl_IDirectMusicObject_SetDescriptor ...@@ -163,7 +163,7 @@ static HRESULT WINAPI IDirectMusicChordMapImpl_IDirectMusicObject_SetDescriptor
This->pDesc->ftDate = pDesc->ftDate; This->pDesc->ftDate = pDesc->ftDate;
if (pDesc->dwValidData & DMUS_OBJ_MEMORY) { if (pDesc->dwValidData & DMUS_OBJ_MEMORY) {
This->pDesc->llMemLength = pDesc->llMemLength; This->pDesc->llMemLength = pDesc->llMemLength;
memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); memcpy (This->pDesc->pbMemData, pDesc->pbMemData, pDesc->llMemLength);
} }
if (pDesc->dwValidData & DMUS_OBJ_STREAM) { if (pDesc->dwValidData & DMUS_OBJ_STREAM) {
/* according to MSDN, we copy the stream */ /* according to MSDN, we copy the stream */
......
...@@ -272,8 +272,8 @@ static HRESULT WINAPI IDirectMusicAudioPathImpl_IDirectMusicObject_SetDescriptor ...@@ -272,8 +272,8 @@ static HRESULT WINAPI IDirectMusicAudioPathImpl_IDirectMusicObject_SetDescriptor
if (pDesc->dwValidData & DMUS_OBJ_DATE) if (pDesc->dwValidData & DMUS_OBJ_DATE)
This->pDesc->ftDate = pDesc->ftDate; This->pDesc->ftDate = pDesc->ftDate;
if (pDesc->dwValidData & DMUS_OBJ_MEMORY) { if (pDesc->dwValidData & DMUS_OBJ_MEMORY) {
memcpy (&This->pDesc->llMemLength, &pDesc->llMemLength, sizeof (pDesc->llMemLength)); This->pDesc->llMemLength = pDesc->llMemLength;
memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); memcpy (This->pDesc->pbMemData, pDesc->pbMemData, pDesc->llMemLength);
} }
if (pDesc->dwValidData & DMUS_OBJ_STREAM) { if (pDesc->dwValidData & DMUS_OBJ_STREAM) {
/* according to MSDN, we copy the stream */ /* according to MSDN, we copy the stream */
......
...@@ -237,8 +237,8 @@ static HRESULT WINAPI IDirectMusicGraphImpl_IDirectMusicObject_SetDescriptor (LP ...@@ -237,8 +237,8 @@ static HRESULT WINAPI IDirectMusicGraphImpl_IDirectMusicObject_SetDescriptor (LP
if (pDesc->dwValidData & DMUS_OBJ_DATE) if (pDesc->dwValidData & DMUS_OBJ_DATE)
This->pDesc->ftDate = pDesc->ftDate; This->pDesc->ftDate = pDesc->ftDate;
if (pDesc->dwValidData & DMUS_OBJ_MEMORY) { if (pDesc->dwValidData & DMUS_OBJ_MEMORY) {
memcpy (&This->pDesc->llMemLength, &pDesc->llMemLength, sizeof (pDesc->llMemLength)); This->pDesc->llMemLength = pDesc->llMemLength;
memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); memcpy (This->pDesc->pbMemData, pDesc->pbMemData, pDesc->llMemLength);
} }
if (pDesc->dwValidData & DMUS_OBJ_STREAM) { if (pDesc->dwValidData & DMUS_OBJ_STREAM) {
/* according to MSDN, we copy the stream */ /* according to MSDN, we copy the stream */
......
...@@ -563,8 +563,8 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicObject_SetDescriptor ...@@ -563,8 +563,8 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicObject_SetDescriptor
if (pDesc->dwValidData & DMUS_OBJ_DATE) if (pDesc->dwValidData & DMUS_OBJ_DATE)
This->pDesc->ftDate = pDesc->ftDate; This->pDesc->ftDate = pDesc->ftDate;
if (pDesc->dwValidData & DMUS_OBJ_MEMORY) { if (pDesc->dwValidData & DMUS_OBJ_MEMORY) {
memcpy (&This->pDesc->llMemLength, &pDesc->llMemLength, sizeof (pDesc->llMemLength)); This->pDesc->llMemLength = pDesc->llMemLength;
memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); memcpy (This->pDesc->pbMemData, pDesc->pbMemData, pDesc->llMemLength);
} }
if (pDesc->dwValidData & DMUS_OBJ_STREAM) { if (pDesc->dwValidData & DMUS_OBJ_STREAM) {
/* according to MSDN, we copy the stream */ /* according to MSDN, we copy the stream */
......
...@@ -241,8 +241,8 @@ static HRESULT WINAPI IDirectMusicScriptImpl_IDirectMusicObject_SetDescriptor (L ...@@ -241,8 +241,8 @@ static HRESULT WINAPI IDirectMusicScriptImpl_IDirectMusicObject_SetDescriptor (L
if (pDesc->dwValidData & DMUS_OBJ_DATE) if (pDesc->dwValidData & DMUS_OBJ_DATE)
This->pDesc->ftDate = pDesc->ftDate; This->pDesc->ftDate = pDesc->ftDate;
if (pDesc->dwValidData & DMUS_OBJ_MEMORY) { if (pDesc->dwValidData & DMUS_OBJ_MEMORY) {
memcpy (&This->pDesc->llMemLength, &pDesc->llMemLength, sizeof (pDesc->llMemLength)); This->pDesc->llMemLength = pDesc->llMemLength;
memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); memcpy (This->pDesc->pbMemData, pDesc->pbMemData, pDesc->llMemLength);
} }
if (pDesc->dwValidData & DMUS_OBJ_STREAM) { if (pDesc->dwValidData & DMUS_OBJ_STREAM) {
/* according to MSDN, we copy the stream */ /* according to MSDN, we copy the stream */
......
...@@ -245,8 +245,8 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_IDirectMusicObject_SetDescriptor (L ...@@ -245,8 +245,8 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_IDirectMusicObject_SetDescriptor (L
if (pDesc->dwValidData & DMUS_OBJ_DATE) if (pDesc->dwValidData & DMUS_OBJ_DATE)
This->pDesc->ftDate = pDesc->ftDate; This->pDesc->ftDate = pDesc->ftDate;
if (pDesc->dwValidData & DMUS_OBJ_MEMORY) { if (pDesc->dwValidData & DMUS_OBJ_MEMORY) {
memcpy (&This->pDesc->llMemLength, &pDesc->llMemLength, sizeof (pDesc->llMemLength)); This->pDesc->llMemLength = pDesc->llMemLength;
memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); memcpy (This->pDesc->pbMemData, pDesc->pbMemData, pDesc->llMemLength);
} }
if (pDesc->dwValidData & DMUS_OBJ_STREAM) { if (pDesc->dwValidData & DMUS_OBJ_STREAM) {
/* according to MSDN, we copy the stream */ /* according to MSDN, we copy the stream */
......
...@@ -209,8 +209,8 @@ static HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicObject_SetDescripto ...@@ -209,8 +209,8 @@ static HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicObject_SetDescripto
if (pDesc->dwValidData & DMUS_OBJ_DATE) if (pDesc->dwValidData & DMUS_OBJ_DATE)
This->pDesc->ftDate = pDesc->ftDate; This->pDesc->ftDate = pDesc->ftDate;
if (pDesc->dwValidData & DMUS_OBJ_MEMORY) { if (pDesc->dwValidData & DMUS_OBJ_MEMORY) {
memcpy (&This->pDesc->llMemLength, &pDesc->llMemLength, sizeof (pDesc->llMemLength)); This->pDesc->llMemLength = pDesc->llMemLength;
memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); memcpy (This->pDesc->pbMemData, pDesc->pbMemData, pDesc->llMemLength);
} }
if (pDesc->dwValidData & DMUS_OBJ_STREAM) { if (pDesc->dwValidData & DMUS_OBJ_STREAM) {
/* according to MSDN, we copy the stream */ /* according to MSDN, we copy the stream */
......
...@@ -361,8 +361,8 @@ static HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_SetDescriptor (LPD ...@@ -361,8 +361,8 @@ static HRESULT WINAPI IDirectMusicWaveImpl_IDirectMusicObject_SetDescriptor (LPD
if (pDesc->dwValidData & DMUS_OBJ_DATE) if (pDesc->dwValidData & DMUS_OBJ_DATE)
This->pDesc->ftDate = pDesc->ftDate; This->pDesc->ftDate = pDesc->ftDate;
if (pDesc->dwValidData & DMUS_OBJ_MEMORY) { if (pDesc->dwValidData & DMUS_OBJ_MEMORY) {
memcpy (&This->pDesc->llMemLength, &pDesc->llMemLength, sizeof (pDesc->llMemLength)); This->pDesc->llMemLength = pDesc->llMemLength;
memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof (pDesc->pbMemData)); memcpy (This->pDesc->pbMemData, pDesc->pbMemData, pDesc->llMemLength);
} }
if (pDesc->dwValidData & DMUS_OBJ_STREAM) { if (pDesc->dwValidData & DMUS_OBJ_STREAM) {
/* according to MSDN, we copy the stream */ /* according to MSDN, we copy the stream */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment