rem: strncpy(pbuffer, &line[begin], WMIN(*ptr-begin, 255)); pbuffer[WMIN(*ptr-begin, 255)] = 0;
add: strncpy(pbuffer, &line[begin], WMIN(*ptr-begin, BUFSIZE)); pbuffer[WMIN(*ptr-begin, BUFSIZE)] = 0;
context: getuserinput(WScreen *scr, char *line, int *ptr){    char *ret;    char *title;    char *prompt;    int j, state;    int begin = 0;    char tbuffer[256], pbuffer[256];    title = _("Program Arguments");    prompt = _("Enter command arguments:");    ret = NULL;#define _STARTING 0#define _TITLE 1#define _PROMPT 2#define _DONE 3    state = _STARTING;    j = 0;    for (; line[*ptr]!=0 && state!=_DONE; (*ptr)++) {	switch (state) {	 case _STARTING:	    if (line[*ptr]=='(') {		state = _TITLE;		begin = *ptr+1;	    } else {		state = _DONE;	    }	    break;	 case _TITLE:	    if (j <= 0 && line[*ptr]==',') {		j = 0;		if (*ptr > begin) {		    strncpy(tbuffer, &line[begin], WMIN(*ptr-begin, 255));		    tbuffer[WMIN(*ptr-begin, 255)] = 0;		    title = (char*)tbuffer;		}		begin = *ptr+1;		state = _PROMPT;	    } else if (j <= 0 && line[*ptr]==')') {		if (*ptr > begin) {		    strncpy(tbuffer, &line[begin], WMIN(*ptr-begin, 255));		    tbuffer[WMIN(*ptr-begin, 255)] = 0;		    title = (char*)tbuffer;		}		state = _DONE;	    } else if (line[*ptr]=='(') {		j++;	    } else if (line[*ptr]==')') {		j--;	    }	    break;	 case _PROMPT:	    if (line[*ptr]==')' && j==0) {		if (*ptr-begin > 1) {		    strncpy(pbuffer, &line[begin], WMIN(*ptr-begin, 255));		    pbuffer[WMIN(*ptr-begin, 255)] = 0;		    prompt = (char*)pbuffer;		}		state = _DONE;	    } else if (line[*ptr]=='(')		    j++;	    else if (line[*ptr]==')')		j--;	    break;	}    }    (*ptr)--;#undef _STARTING#undef _TITLE#undef _PROMPT#undef _DONE    if (!wInputDialog(scr, title, prompt, &ret))	return NULL;    else	return ret;}