Ignore:
Timestamp:
May 2, 2013, 5:39:58 PM (12 years ago)
Author:
Alex Taylor
Message:

Fix to SplPdQuery allowing the required buffer size to be queried.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/smbpdr-1.0/smb.c

    r758 r772  
    955955
    956956        case BIDI_Q_PORTDRV:
     957            // If no buffer was provided, just return the required size
     958            if ( !pOutData && pcbOutData ) {
     959                *pcbOutData = sizeof( PORTSETTINGS );
     960                return ERROR_MORE_DATA;
     961            }
    957962            // Make sure the data is valid
    958             if ( !pOutData || *pcbOutData < sizeof( PORTSETTINGS ))
     963            if ( !pOutData || !pcbOutData || ( *pcbOutData < sizeof( PORTSETTINGS )))
    959964                return( ERROR_INVALID_PARAMETER );
    960965            pSettings = (PPORTSETTINGS) pOutData;
Note: See TracChangeset for help on using the changeset viewer.