...
 
Commits (4)
......@@ -4900,7 +4900,6 @@ static BOOL exec_cgi(http_session_t *session)
if(i!=-1 && i!=0) {
buf[i]=0;
lprintf(LOG_ERR,"%04d CGI Error: %s",session->socket,buf);
start=time(NULL);
}
}
......@@ -4908,7 +4907,6 @@ static BOOL exec_cgi(http_session_t *session)
i=read(out_pipe[0],buf,sizeof(buf));
if(i!=-1 && i!=0) {
int snt=0;
start=time(NULL);
snt=writebuf(session,buf,i);
if(session->req.ld!=NULL)
session->req.ld->size+=snt;
......
......@@ -295,6 +295,9 @@ static void free_paragraphs(struct paragraph *paragraph, int count)
{
int i;
if (paragraph == NULL)
return;
for(i=0; count == -1 || i<count ;i++) {
FREE_AND_NULL(paragraph[i].prefix.bytes);
if (count == -1 && paragraph[i].text == NULL)
......@@ -351,18 +354,14 @@ static struct paragraph *word_unwrap(char *inbuf, int oldlen, BOOL handle_quotes
incol = 0;
/* Start of a new paragraph (ie: after a hard CR) */
newret = realloc(ret, (paragraph+1) * sizeof(struct paragraph));
if (newret == NULL) {
free_paragraphs(ret, paragraph);
return NULL;
}
if (newret == NULL)
goto fail_return;
ret = newret;
ret[paragraph].text = (char *)malloc(alloc_len);
ret[paragraph].len = 0;
ret[paragraph].prefix.bytes = NULL;
if (ret[paragraph].text == NULL) {
free_paragraphs(ret, paragraph+1);
return NULL;
}
if (ret[paragraph].text == NULL)
goto fail_return;
ret[paragraph].alloc_size = alloc_len;
ret[paragraph].text[0] = 0;
if (handle_quotes) {
......@@ -468,10 +467,8 @@ static struct paragraph *word_unwrap(char *inbuf, int oldlen, BOOL handle_quotes
}
newret = realloc(ret, (paragraph+1) * sizeof(struct paragraph));
if (newret == NULL) {
free_paragraphs(ret, paragraph);
return NULL;
}
if (newret == NULL)
goto fail_return;
ret = newret;
memset(&ret[paragraph], 0, sizeof(ret[0]));
......@@ -479,6 +476,7 @@ static struct paragraph *word_unwrap(char *inbuf, int oldlen, BOOL handle_quotes
fail_return:
free_paragraphs(ret, paragraph+1);
free(ret);
return NULL;
}
......
......@@ -1052,7 +1052,7 @@ int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir)
char fname[MAX_PATH+1];
char fullpath[MAX_PATH+1];
char fullcmdline[MAX_PATH+1];
char* argv[MAX_ARGS];
char* argv[MAX_ARGS + 1];
BYTE* bp;
BYTE buf[XTRN_IO_BUF_LEN];
BYTE output_buf[XTRN_IO_BUF_LEN*2];
......
......@@ -284,7 +284,7 @@ int modem_connect(struct bbslist *bbs)
if (!comSetFlowControl(com, bbs->flow_control)) {
conn_api.close();
if (!bbs->hidepopups) {
uifcmsg(respbuf, "`Failed to set Flow Control`\n\n"
uifcmsg("Failed to set Flow Control", "`Failed to set Flow Control`\n\n"
"SyncTERM was unable to set flow control.\n");
}
return(-1);
......