summaryrefslogtreecommitdiffabout
path: root/PumpKINDlg.cpp
Side-by-side diff
Diffstat (limited to 'PumpKINDlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--PumpKINDlg.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/PumpKINDlg.cpp b/PumpKINDlg.cpp
index bb15211..f41b69f 100644
--- a/PumpKINDlg.cpp
+++ b/PumpKINDlg.cpp
@@ -97,5 +97,5 @@ CPumpKINDlg::CPumpKINDlg(CWnd* pParent /*=NULL*/)
m_bShown=TRUE;
m_bExiting=FALSE;
- m_BlockSize=1024;
+ m_BlockSize=2048;
m_bnw.AssignSound("(bang)",IDR_WAVE_RING,CBellsNWhistles::CBang::bangResource);
m_bnw.AssignSound("(done)",IDR_WAVE_FINISHED,CBellsNWhistles::CBang::bangResource);
@@ -1034,4 +1034,8 @@ BOOL CWRQSocket::OnTFTP(tftp* p)
m_xferSize=atoi(v);
}
+ if(m_xferSize>=0 && m_xferSize>=(m_blkSize<<16)) {
+ Deny(tftp::errUndefined,IDS_TFTP_ERROR_TOOBIG);
+ return TRUE;
+ }
}
UpdateList();
@@ -1410,4 +1414,9 @@ tftp::tftpOptions oack;
}else
m_ACK=0;
+ // XXX: see if we can negotiate the right block size somehow
+ if(m_xferSize>=0 && m_xferSize>=(m_blkSize<<16)) {
+ Deny(tftp::errUndefined,IDS_TFTP_ERROR_TOOBIG);
+ return TRUE;
+ }
state=stateXfer;
if(oack.GetCount()){