diff options
author | 2006-06-21 20:07:46 +1000 | |
---|---|---|
committer | 2006-06-21 20:07:46 +1000 | |
commit | 407c96e943d10c1595d0438ca81c098b78158905 (patch) | |
tree | a51cbfc35e9400165578c278e45d2d91a2ec3e58 /event.c | |
parent | bf333f2a84a1895fe056d213250691e37416e7f7 (diff) |
Even more input validation
darcs-hash:20060621100746-ac50b-8aa5648c05a656829a895669be27c6fa4f1d8458.gz
Diffstat (limited to 'event.c')
-rw-r--r-- | event.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -196,6 +196,9 @@ static int event_is_blocked( event_t *e ) const wchar_t *event_get_desc( event_t *e ) { + + CHECK( e, 0 ); + if( !get_desc_buff ) { get_desc_buff=sb_halloc( global_context ); @@ -253,6 +256,8 @@ void event_add_handler( event_t *event ) { event_t *e; + CHECK( event, ); + e = event_copy( event, 0 ); if( !events ) @@ -272,6 +277,8 @@ void event_remove( event_t *criterion ) array_list_t *new_list=0; event_t e; + CHECK( criterion, ); + /* Because of concurrency issues (env_remove could remove an event that is currently being executed), env_remove does not actually @@ -282,7 +289,7 @@ void event_remove( event_t *criterion ) */ if( !events ) - return; + return; for( i=0; i<al_get_count( events); i++ ) { @@ -330,6 +337,8 @@ int event_get( event_t *criterion, array_list_t *out ) if( !events ) return 0; + + CHECK( criterion, 0 ); for( i=0; i<al_get_count( events); i++ ) { @@ -644,6 +653,8 @@ void event_destroy() void event_free( event_t *e ) { + CHECK( e, ); + /* When apropriate, we clear the argument vector */ |