rem: strcat(last_line,buf_start);
add: strncat(last_line,buf_start, BUF_SIZE-strlen(last_line)-1);
context: void sspm_read_header(struct mime_impl *impl,struct sspm_header *header){#define BUF_SIZE 1024#define MAX_HEADER_LINES 25    char *buf;    char header_lines[MAX_HEADER_LINES][BUF_SIZE]; /* HACK, hard limits */    int current_line = -1;    int end = 0;    memset(header_lines,0,sizeof(header_lines));    memset(header,0,sizeof(struct sspm_header));    /* Set up default header */    header->def = 1;    header->major = SSPM_TEXT_MAJOR_TYPE;    header->minor = SSPM_PLAIN_MINOR_TYPE;    header->error = SSPM_NO_ERROR;    header->error_text = 0;    /* Read all of the lines into memory */    while(end==0&& (buf=sspm_get_next_line(impl)) != 0){	enum line_type line_type = get_line_type(buf);		switch(line_type){	    case BLANK: {		end = 1;		impl->state = END_OF_HEADER;		break;	    }	    case MAIL_HEADER:	    case MIME_HEADER: {	    		impl->state = IN_HEADER;		current_line++;				assert(strlen(buf) < BUF_SIZE);				strncpy(header_lines[current_line],buf,BUF_SIZE);		header_lines[current_line][BUF_SIZE-1] = '\0';				break;	    }	    	    case HEADER_CONTINUATION: {		char* last_line, *end;		char *buf_start;		if(current_line < 0){		    /* This is not really a continuation line, since                       we have not see any header line yet */		    sspm_set_error(header,SSPM_MALFORMED_HEADER_ERROR,buf);		    return;		}		last_line = header_lines[current_line];		end = (char*) ( (size_t)strlen(last_line)+				      (size_t)last_line);				impl->state = IN_HEADER;				/* skip over the spaces in buf start, and remove the new		   line at the end of the lat line */		if (last_line[strlen(last_line)-1] == '\n'){		    last_line[strlen(last_line)-1] = '\0';		}		buf_start = buf;		while(*buf_start == ' ' ||*buf_start == '\t' ){		    buf_start++;		}				assert( strlen(buf_start) + strlen(last_line) < BUF_SIZE);				strcat(last_line,buf_start);				break;	    }	    	    default: {		sspm_set_error(header,SSPM_MALFORMED_HEADER_ERROR,buf);		return;	    }	}    }	    for(current_line = 0;	current_line < MAX_HEADER_LINES && header_lines[current_line][0] != 0;	current_line++){		sspm_build_header(header,header_lines[current_line]);    }}