Changeset 2387d9b41dd4cca510a032c0141580a700a81d64

Show
Ignore:
Timestamp:
08/04/03 04:06:13 (6 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1049767573 +0000
git-parent:

[6bbf004ec5813a76f7443fa627a3833bfd1b3d80]

git-author:
Gildas Bazin <gbazin@videolan.org> 1049767573 +0000
Message:

* 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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/skins/src/event.cpp

    rfd76cff r2387d9b  
    33 ***************************************************************************** 
    44 * Copyright (C) 2003 VideoLAN 
    5  * $Id: event.cpp,v 1.3 2003/04/01 12:24:54 gbazin Exp $ 
     5 * $Id: event.cpp,v 1.4 2003/04/08 02:06:13 gbazin Exp $ 
    66 * 
    77 * Authors: Olivier Teuli� <ipkiss@via.ecp.fr> 
     
    9797void Event::PostTextMessage( string text ) 
    9898{ 
    99     char *txt = new char[text.size()]; 
     99    char *txt = new char[text.size()+1]; 
    100100    strcpy( txt, text.c_str() ); 
    101101    OSAPI_PostMessage( NULL, CTRL_SET_TEXT, (unsigned int)this, (long)txt ); 
  • modules/gui/skins/src/event.h

    r8558137 r2387d9b  
    33 ***************************************************************************** 
    44 * Copyright (C) 2003 VideoLAN 
    5  * $Id: event.h,v 1.2 2003/03/20 09:29:07 karibu Exp $ 
     5 * $Id: event.h,v 1.3 2003/04/08 02:06:13 gbazin Exp $ 
    66 * 
    77 * Authors: Olivier Teuli� <ipkiss@via.ecp.fr> 
     
    3939//--------------------------------------------------------------------------- 
    4040 
    41 #define MAX_EVENT_SIZE 2
     41#define MAX_EVENT_SIZE 3
    4242#define MAX_PARAM_SIZE 20 
    4343