Exploit made by a madman

found near the end of an exploit for CVE-2012-0432

the exploit can be found here:
https://www.exploit-db.com/exploits/24205/

    for (i=STDIN_FILENO; i<=sockfd; i++){
      if (FD_ISSET(i, &rdfdset)){
    ioctl(i, FIONREAD, &len_in);
    if (len_in == 0){
      printf("Connection closed\n");
      exit(EXIT_SUCCESS);
    }
    while (len_in--){
      read(i, &iochar, 1);
      write(i == sockfd ? STDOUT_FILENO : sockfd, &iochar, 1);
    }
      }
    }
    rdfdset = fdsave;
  }
 
}