이해가 되지 않네요.
i는 max 값이구요, 그 이상가면 세그먼트 펄트가 납니다.
[code:1]
#include <stdio.h>
#include <stdlib.h>
int main()
{
char buf[1];
char *pts;
int i=0;
strcpy(buf, "#");
pts = (char *)malloc(strlen(buf));
strcat(pts, buf);
while(1){
i++;
pts = (char *)realloc(pts, strlen(buf));
strcat(pts, buf);