Ignore:
Timestamp:
Jul 16, 2003, 5:47:24 PM (22 years ago)
Author:
sandervl
Message:

KOM: fixed potential buffer overflows in *GetErrorString functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/winmm/waveout.cpp

    r9916 r10173  
    1 /* $Id: waveout.cpp,v 1.26 2003-03-06 15:42:33 sandervl Exp $ */
     1/* $Id: waveout.cpp,v 1.27 2003-07-16 15:47:24 sandervl Exp $ */
    22//#undef DEBUG
    33/*
     
    3939/******************************************************************************/
    4040/******************************************************************************/
    41 MMRESULT WINAPI waveOutOpen(LPHWAVEOUT phwo, UINT uDeviceID, const LPWAVEFORMATEX pwfx, 
     41MMRESULT WINAPI waveOutOpen(LPHWAVEOUT phwo, UINT uDeviceID, const LPWAVEFORMATEX pwfx,
    4242                            DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen)
    4343{
     
    4949        return(WAVERR_BADFORMAT);
    5050
    51     if(fdwOpen & WAVE_FORMAT_QUERY) 
     51    if(fdwOpen & WAVE_FORMAT_QUERY)
    5252    {
    5353        if(DartWaveOut::queryFormat(pwfx->wFormatTag, pwfx->nChannels, pwfx->nSamplesPerSec,
     
    332332    char * theMsg = getWinmmMsg( wError );
    333333    if(theMsg) {
    334         AsciiToUnicode( theMsg, lpText );
     334        AsciiToUnicodeN( theMsg, lpText, cchText );
    335335    }
    336336    else
     
    338338        char errMsg[100];
    339339        sprintf( errMsg, "Unknown error number %d", wError );
    340         AsciiToUnicode( errMsg, lpText );
     340        AsciiToUnicodeN( errMsg, lpText, cchText );
    341341    }
    342342    return MMSYSERR_NOERROR;
     
    419419{
    420420    WaveOut *dwave = (WaveOut *)hwo;
    421    
     421
    422422    dprintf(("waveOutSetPlaybackRate: NOT IMPLEMENTED!!"));
    423423    if(WaveOut::find(dwave) == TRUE)
Note: See TracChangeset for help on using the changeset viewer.