(/home/sate/Testcases/c/cve/wireshark-1.2.0/tap-rpcstat.c) |
| |
| 294 | | | rs->version=version; |
| 295 | | | if(filter){ |
| 296 | | | rs->filter=g_strdup(filter); |
| 297 | | | } else { |
| 298 | | | rs->filter=NULL; |
| 299 | | | } |
| 300 | | | rpc_program=program; |
| 301 | | | rpc_version=version; |
| 302 | | | rpc_min_proc=-1; |
| 303 | | | rpc_max_proc=-1; |
| 304 | | | g_hash_table_foreach(rpc_procs, (GHFunc)rpcstat_find_procs, NULL); |
Dangerous Function Cast
Casting rpcstat_find_procs to this new type could lead to unsafe program behavior. - The function return types have different sizes.
- The previous return type was void* which has size 4.
- The new return type is void which has size 0.
|
|
| 305 | | | if(rpc_min_proc==-1){ |
| 306 | | | fprintf(stderr,"tshark: Invalid -z rpc,rrt,%d,%d\n",rpc_program,rpc_version); |
| 307 | | | fprintf(stderr," Program:%d version:%d isn't supported by tshark.\n", rpc_program, rpc_version); |
| 308 | | | exit(1); |
| 309 | | | } |
| 310 | | | |
| 311 | | | |
| 312 | | | rs->num_procedures=rpc_max_proc+1; |
| 313 | | | rs->procedures=g_malloc(sizeof(rpc_procedure_t)*(rs->num_procedures+1)); |
| 314 | | | for(i=0;i<rs->num_procedures;i++){ |
| |