Changeset 3497 for trunk/src


Ignore:
Timestamp:
May 5, 2000, 8:21:36 PM (25 years ago)
Author:
sandervl
Message:

BindCtxImpl_SetBindOptions & BindCtxImpl_GetBindOptions bugfixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ole32/bindctx.cpp

    r1711 r3497  
    1 /* $Id: bindctx.cpp,v 1.2 1999-11-12 12:00:14 davidr Exp $ */
     1/* $Id: bindctx.cpp,v 1.3 2000-05-05 18:21:36 sandervl Exp $ */
    22/*
    33 * BindCtx implementation
     
    307307        return E_POINTER;
    308308   
    309     This->bindOption2=*pbindopts;
     309    if (pbindopts->cbStruct > sizeof(BIND_OPTS2))
     310    {
     311        WARN("invalid size");
     312        return E_INVALIDARG; /* FIXME : not verified */
     313    }
     314    memcpy(&This->bindOption2, pbindopts, pbindopts->cbStruct);
    310315
    311316    return S_OK;
     
    324329        return E_POINTER;
    325330
    326     *pbindopts=This->bindOption2;
     331    if (pbindopts->cbStruct > sizeof(BIND_OPTS2))
     332    {
     333        WARN("invalid size");
     334        return E_INVALIDARG; /* FIXME : not verified */
     335    }
     336    memcpy(pbindopts, &This->bindOption2, pbindopts->cbStruct);
    327337   
    328338    return S_OK;
Note: See TracChangeset for help on using the changeset viewer.