Commit 2387d9b4 authored by Gildas Bazin's avatar Gildas Bazin

*  modules/gui/skins/src/event.cpp, modules/gui/skins/src/event.h:
    fixed 2 nasty buffer overflows. This fixes the last crashes I've got
    with the skins interface.
parent 6bbf004e
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* event.cpp: Event class * event.cpp: Event class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: event.cpp,v 1.3 2003/04/01 12:24:54 gbazin Exp $ * $Id: event.cpp,v 1.4 2003/04/08 02:06:13 gbazin Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -96,7 +96,7 @@ void Event::PostSynchroMessage( bool autodelete ) ...@@ -96,7 +96,7 @@ void Event::PostSynchroMessage( bool autodelete )
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void Event::PostTextMessage( string text ) void Event::PostTextMessage( string text )
{ {
char *txt = new char[text.size()]; char *txt = new char[text.size()+1];
strcpy( txt, text.c_str() ); strcpy( txt, text.c_str() );
OSAPI_PostMessage( NULL, CTRL_SET_TEXT, (unsigned int)this, (long)txt ); OSAPI_PostMessage( NULL, CTRL_SET_TEXT, (unsigned int)this, (long)txt );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* event.h: Event class * event.h: Event class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: event.h,v 1.2 2003/03/20 09:29:07 karibu Exp $ * $Id: event.h,v 1.3 2003/04/08 02:06:13 gbazin Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -38,7 +38,7 @@ using namespace std; ...@@ -38,7 +38,7 @@ using namespace std;
// VLC specific messages // VLC specific messages
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#define MAX_EVENT_SIZE 20 #define MAX_EVENT_SIZE 30
#define MAX_PARAM_SIZE 20 #define MAX_PARAM_SIZE 20
#define VLC_MESSAGE (WM_APP) #define VLC_MESSAGE (WM_APP)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment