pike.git / src / opcodes.c

version» Context lines:

pike.git/src/opcodes.c:14:   #include "multiset.h"   #include "opcodes.h"   #include "object.h"   #include "error.h"   #include "pike_types.h"   #include "pike_memory.h"   #include "fd_control.h"   #include "cyclic.h"   #include "builtin_functions.h"   #include "module_support.h" + #include "security.h"    - RCSID("$Id: opcodes.c,v 1.34 1999/01/01 01:10:28 hubbe Exp $"); + RCSID("$Id: opcodes.c,v 1.35 1999/01/21 09:15:11 hubbe Exp $");      void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind)   {    INT32 i; -  +  + #ifdef PIKE_SECURITY +  if(what->type <= MAX_COMPLEX) +  if(!CHECK_DATA_SECURITY(what->u.array, SECURITY_BIT_INDEX)) +  error("Index permission denied.\n"); + #endif +     switch(what->type)    {    case T_ARRAY:    simple_array_index_no_free(to,what->u.array,ind);    break;       case T_MAPPING:    mapping_index_no_free(to,what->u.mapping,ind);    break;   
pike.git/src/opcodes.c:114:    error("No cast method in object.\n");    apply_lfun(sp[-2].u.object, LFUN_CAST, 1);    free_svalue(sp-2);    sp[-2]=sp[-1];    sp--;    return;    }       switch(run_time_type)    { +  default: +  error("Cannot perform cast to that type.\n"); +     case T_MIXED:    return;       case T_ARRAY:    switch(sp[-1].type)    {    case T_MAPPING:    {    struct array *a=mapping_to_array(sp[-1].u.mapping);    pop_stack();