func: static int CVE_2011_2535_PATCHED_iax2_setoption(struct ast_channel *c, int option, void *data, int datalen) struct ast_option_header * h ; switch ( option )  unsigned short callno = PTR_TO_CALLNO ( c -> tech_pvt ) ; struct chan_iax2_pvt * pvt ; pvt = iaxs [ callno ]; if ( wait_for_peercallno ( pvt ) )  if ( ! ( h = ast_malloc ( datalen + sizeof ( * h ) ) ) )  h -> flag = AST_OPTION_FLAG_REQUEST; h -> option = htons ( option ); memcpy ( h -> data , data , datalen ); res = send_command_locked ( PTR_TO_CALLNO ( c -> tech_pvt ) , AST_FRAME_CONTROL , AST_CONTROL_OPTION , 0 , ( unsigned char * ) h , datalen + sizeof ( * h ) , - 1 ); ast_free ( h ); return res ; 