79255: [PATCH] dpnet: Fixed bad pointer addition (Coverity)

buildbot at kegel.com buildbot at kegel.com
Sun Sep 25 23:14:55 CDT 2011


This is an experimental automated build and test service.
Please feel free to ignore this email while we work the kinks out.

For more info about this message, see http://wiki.winehq.org/BuildBot

The Buildbot has detected a failed build on builder runtests-heaptest while building Wine.
Full details are available at: http://buildbot.kegel.com/builders/runtests-heaptest/builds/3 (though maybe not for long, as I'm still reinstalling the buildbot periodically while experimenting)
BUILD FAILED: failed shell_3

Errors:
alarum: failed command was ../../../wine comctl32_test.exe.so treeview.c 
treeview.c:1512: Test failed: got 0x78248a
treeview.c:1518: Test failed: got 0x78248a
make: *** [treeview.ok] Error 2
* Call to xpconnect wrapped JSObject produced this error:  *
* Call to xpconnect wrapped JSObject produced this error:  *
alarum: failed command was ../../../wine oleaut32_test.exe.so olepicture.c 
fixme:ole:OleLoadPictureEx (0x11d3c0,60,1,{7bf80980-bf32-101a-8bbb-00aa00300cab},x=100,y=100,f=0,0x34fcac), partially implemented.
fixme:ole:OleLoadPictureEx (0x11c368,50,1,{7bf80980-bf32-101a-8bbb-00aa00300cab},x=100,y=100,f=0,0x34fcd8), partially implemented.
fixme:ole:OLEPictureImpl_Load Unknown magic 0001, 50 read bytes:
01 00 09 00 00 03 19 00 01 00 
09 00 00 03 19 00 00 00 00 00 
0d 00 00 00 00 00 0d 00 00 00 
32 0a 16 00 0b 00 04 00 00 00 
54 65 73 74 03 00 05 00 08 00 
0c 00 03 00 00 00 00 00 
err:ole:OleLoadPictureEx IPersistStream_Load failed
fixme:ole:OleLoadPictureEx (0x11c4a8,244,1,{7bf80980-bf32-101a-8bbb-00aa00300cab},x=10,y=10,f=0,0x34fcb0), partially implemented.
err:ole:OLEPictureImpl_Invoke riid was {7bf80981-bf32-101a-8bbb-00aa00300cab} instead of IID_NULL
err:ole:OLEPictureImpl_Invoke riid was {00000000-0000-0000-c000-000000000046} instead of IID_NULL
err:ole:OLEPictureImpl_Invoke param count for DISPATCH_PROPERTYPUT was 0 instead of 1
err:ole:OLEPictureImpl_Invoke null pDispParams not allowed
err:ole:OLEPictureImpl_Invoke null pDispParams not allowed
err:ole:OLEPictureImpl_Invoke null pDispParams not allowed
err:ole:OLEPictureImpl_Invoke invalid dispid 0x2 or wFlags 0x1
err:ole:OLEPictureImpl_Invoke invalid dispid 0xdeadbeef or wFlags 0x2
err:ole:OLEPictureImpl_Invoke param count for DISPATCH_PROPERTYGET was 1 instead of 0
err:ole:OLEPictureImpl_Invoke param count for DISPATCH_PROPERTYGET was 1 instead of 0
fixme:ole:OLEPictureImpl_Render Not quite correct implementation of rendering icons...
olepicture.c:696: Test failed: Color at 5,5 should have changed, but still was 0xA8058B
make: *** [olepicture.ok] Error 1

-------------- next part --------------
From: Marcus Meissner <marcus at jet.franken.de>
Subject: [PATCH] dpnet: Fixed bad pointer addition (Coverity)
Message-Id: <1316853724-13295-1-git-send-email-marcus at jet.franken.de>
Date: Sat, 24 Sep 2011 10:42:04 +0200

Hi,

A pointer + integer is always pointer+(sizeof(*pointer)*integer) addition
already, so +1 is better here.

CID 5334.

Ciao, Marcus
---
 dlls/dpnet/peer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/dpnet/peer.c b/dlls/dpnet/peer.c
index 307b306..947531a 100644
--- a/dlls/dpnet/peer.c
+++ b/dlls/dpnet/peer.c
@@ -127,7 +127,7 @@ static HRESULT WINAPI IDirectPlay8PeerImpl_EnumServiceProviders(IDirectPlay8Peer
         return DPNERR_BUFFERTOOSMALL;
     }
 
-    pSPInfoBuffer->pwszName = (LPWSTR)(pSPInfoBuffer + sizeof(DPN_SERVICE_PROVIDER_INFO));
+    pSPInfoBuffer->pwszName = (LPWSTR)(pSPInfoBuffer + 1);
 
     if(!pguidServiceProvider)
     {
-- 
1.7.3.4



More information about the wine-tests-results mailing list