From: VMware, Inc <> Date: Wed, 18 Sep 2013 03:15:12 +0000 (-0700) Subject: HGFS: Fix server check for minimum sizes of session requests X-Git-Tag: 2013.09.16-1328054~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61bd632f8cac230d9fb06bda67ebd0bfa33b13ff;p=thirdparty%2Fopen-vm-tools.git HGFS: Fix server check for minimum sizes of session requests The HGFS server check for the minimum protocol request sizes for create and destroy session was incorrect. The full request including the reserved fields must be sent by the clients. Currently they all do that, including any shipping versions. Signed-off-by: Dmitry Torokhov --- diff --git a/open-vm-tools/lib/hgfsServer/hgfsServer.c b/open-vm-tools/lib/hgfsServer/hgfsServer.c index 671dec682..d3569a2bf 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServer.c +++ b/open-vm-tools/lib/hgfsServer/hgfsServer.c @@ -2829,8 +2829,8 @@ static struct { * second field is the minimum size for actual HGFS operational request * and not the minimum size of operational request with a header. */ - { HgfsServerCreateSession, offsetof(HgfsRequestCreateSessionV4, reserved), REQ_SYNC}, - { HgfsServerDestroySession, offsetof(HgfsRequestDestroySessionV4, reserved), REQ_SYNC}, + { HgfsServerCreateSession, sizeof (HgfsRequestCreateSessionV4), REQ_SYNC}, + { HgfsServerDestroySession, sizeof (HgfsRequestDestroySessionV4), REQ_SYNC}, { HgfsServerRead, sizeof (HgfsRequestReadV3), REQ_SYNC}, { HgfsServerWrite, sizeof (HgfsRequestWriteV3), REQ_SYNC}, { HgfsServerSetDirNotifyWatch, sizeof (HgfsRequestSetWatchV4), REQ_SYNC},