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/midi.cpp

    r8470 r10173  
    1 /* $Id: midi.cpp,v 1.10 2002-05-22 15:50:24 sandervl Exp $ */
     1/* $Id: midi.cpp,v 1.11 2003-07-16 15:47:24 sandervl Exp $ */
    22
    33/*
     
    2828#include <wprocess.h>
    2929
    30 #define DBG_LOCALLOG    DBG_midi
     30#define DBG_LOCALLOG    DBG_midi
    3131#include "dbglocal.h"
    3232
     
    262262  char * theMsg = getWinmmMsg( wError );
    263263  if ( theMsg )
    264     AsciiToUnicode( theMsg, lpText );
     264    AsciiToUnicodeN( theMsg, lpText, cchText );
    265265  else
    266266  {
    267267    char errMsg[100];
    268268    sprintf( errMsg, "Unknown error number %d", wError );
    269     AsciiToUnicode( errMsg, lpText );
     269    AsciiToUnicodeN( errMsg, lpText, cchText );
    270270  }
    271271  return MMSYSERR_NOERROR;
     
    581581  char * theMsg = getWinmmMsg( wError );
    582582  if ( theMsg )
    583     AsciiToUnicode( theMsg, lpText );
     583    AsciiToUnicodeN( theMsg, lpText, cchText );
    584584  else
    585585  {
    586586    char errMsg[100];
    587587    sprintf( errMsg, "Unknown error number %d", wError );
    588     AsciiToUnicode( errMsg, lpText );
     588    AsciiToUnicodeN( errMsg, lpText, cchText );
    589589  }
    590590  return MMSYSERR_NOERROR;
Note: See TracChangeset for help on using the changeset viewer.