diff options
| author | Dave Hibberd <hibby@debian.org> | 2024-08-30 10:14:56 +0100 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2024-08-30 10:14:56 +0100 |
| commit | 6dfe32758e1a995b1241af8c981798c22cd70439 (patch) | |
| tree | 7629ba162dd6b1240bb696c043e287781c269c66 /HTTPcode.c | |
| parent | 766bbe358d961346b239ffe868d1477567046f41 (diff) | |
New upstream version 6.0.24.42upstream/6.0.24.42
Diffstat (limited to 'HTTPcode.c')
| -rw-r--r-- | HTTPcode.c | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -600,7 +600,8 @@ VOID HTTPTimer() for (n = Last;;)
{
- strcat(_REPLYBUFFER, Session->ScreenLines[n]);
+ if ((strlen(Session->ScreenLines[n]) + strlen(_REPLYBUFFER)) < 99999)
+ strcat(_REPLYBUFFER, Session->ScreenLines[n]);
if (n == 99)
n = -1;
@@ -680,13 +681,15 @@ struct HTTPConnectionInfo * FindSession(char * Key) void ProcessTermInput(SOCKET sock, char * MsgPtr, int MsgLen, char * Key)
{
- char _REPLYBUFFER[1024];
+ char _REPLYBUFFER[2048];
int ReplyLen;
char Header[256];
int HeaderLen;
int State;
struct HTTPConnectionInfo * Session = FindSession(Key);
int Stream;
+ int maxlen = 1000;
+
if (Session == NULL)
{
@@ -701,12 +704,24 @@ void ProcessTermInput(SOCKET sock, char * MsgPtr, int MsgLen, char * Key) char c;
UCHAR hex;
+ int msglen = end - input;
+
struct TNCINFO * TNC = Session->TNC;
struct TCPINFO * TCP = 0;
if (TNC)
TCP = TNC->TCPInfo;
+ if (TCP && TCP->WebTermCSS)
+ maxlen -= strlen(TCP->WebTermCSS);
+
+ if (MsgLen > maxlen)
+ {
+ Session->KillTimer = 99999; // close session
+ return;
+ }
+
+
if (TCP && TCP->WebTermCSS)
ReplyLen = sprintf(_REPLYBUFFER, InputLine, Key, TCP->WebTermCSS);
else
|
