All pastes #763031 Raw Edit

Mine

public text v1 · immutable
·published 2007-11-06 02:29 UTC
rendered paste body
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int foo(char *arg)
{
  char buf[96];
  int len, i;

  len = strlen(arg);
  if (len > 104)
    len = 104;
  
  for (i = 0; i <= len; i++)
    buf[i] = arg[i];

  return 0;
}

int main(int argc, char *argv[])
{
  if (argc != 2)
    {
      fprintf(stderr, "target2: argc != 2\n");
      exit(EXIT_FAILURE);
    }
  foo(argv[1]);
  return 0;
}