--- capa/capa51/pProj/capaCgiUtils.c 2000/01/25 17:14:29 1.10 +++ capa/capa51/pProj/capaCgiUtils.c 2000/02/22 18:13:20 1.12 @@ -801,7 +801,7 @@ void append_qtext(new_str) char * len,g_qchar_cnt,g_qsize); fflush(g_cgi); #endif /* CGI_DBUG */ - if (g_qchar_cnt+len>g_qsize-1) { + if (g_qchar_cnt+len>g_qsize-2) { char *temp_text; g_qsize=(g_qchar_cnt+len)*2; temp_text=capa_malloc(g_qsize,sizeof(char)); @@ -815,7 +815,7 @@ void append_qtext(new_str) char * g_qchar_cnt += len; g_question_txt[g_qchar_cnt+1]='\0'; #ifdef CGI_DBUG - fprintf(g_cgi,"after: len %d; g_qchar_cnt %d; g_qsize %d\n",len,g_qchar_cnt,g_qsize); + fprintf(g_cgi,"after: len %d; g_qchar_cnt %d; g_qsize %d; strlen(g_question_txt):%d\n",len,g_qchar_cnt,g_qsize,strlen(g_question_txt)); fflush(g_cgi); #endif /* CGI_DBUG */ } @@ -829,7 +829,7 @@ void append_stext(new_str) char * new_str,len,g_schar_cnt,g_ssize); fflush(g_cgi); #endif /* CGI_DBUG */ - if (g_schar_cnt+len>g_ssize-1) { + if (g_schar_cnt+len>g_ssize-2) { char *temp_text; g_ssize=(g_schar_cnt+len)*2; temp_text=capa_malloc(g_ssize,sizeof(char)); @@ -1063,6 +1063,8 @@ print_page_header(mode,num_quest) int mo char *serverName; int configResult,term_summary_button=1; + buf[0]='\0'; + discussdir[0]='\0'; serverName=getenv("SERVER_NAME"); if (!serverName) { fprintf(stdout,"Enviroment variable SERVER_NAME not set.\n"); @@ -1406,7 +1408,7 @@ char *class_dir; char *c_owner;char *cla if ( result != 0 ) { if( !g_passdue ) { - append_qtext("