/* 
 * Another bug to play with - try it.
 *
 * by bob[at]dtors
 *
 */

#include <stdio.h>
#include <fcntl.h>

char buf[1024];
char bytes[256];
char *py;


bob (char *buf, int len)
{
  register int x;
  register char * pb;

  pb = buf;
  x = len;
  while (x > 0) {
    *pb = (*pb ^ *py);
    pb++;
    py++;
    if (! *py)
    py = bytes;
    fprintf(stdout,buf);
    x--;

  }
}


int main (int argc,char *argv[])
{
  int x = 0;

  memset (bytes, 0, sizeof (bytes));
  bytes[0] = 0xb0;

  py = bytes;
  x = 1;
  fprintf(stdout, "bobbed output: ");

  while (x > 0) {
  x = read (0, buf);
  bob (buf, x);
  }

  exit (0);
}



