summaryrefslogtreecommitdiffabout
path: root/PumpKINDlg.cpp
Unidiff
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
@@ -96,7 +96,7 @@ CPumpKINDlg::CPumpKINDlg(CWnd* pParent /*=NULL*/)
96 m_PromptTimeOut=30; 96 m_PromptTimeOut=30;
97 m_bShown=TRUE; 97 m_bShown=TRUE;
98 m_bExiting=FALSE; 98 m_bExiting=FALSE;
99 m_BlockSize=1024; 99 m_BlockSize=2048;
100 m_bnw.AssignSound("(bang)",IDR_WAVE_RING,CBellsNWhistles::CBang::bangResource); 100 m_bnw.AssignSound("(bang)",IDR_WAVE_RING,CBellsNWhistles::CBang::bangResource);
101 m_bnw.AssignSound("(done)",IDR_WAVE_FINISHED,CBellsNWhistles::CBang::bangResource); 101 m_bnw.AssignSound("(done)",IDR_WAVE_FINISHED,CBellsNWhistles::CBang::bangResource);
102 m_bnw.AssignSound("(oops)",IDR_WAVE_ABORTED,CBellsNWhistles::CBang::bangResource); 102 m_bnw.AssignSound("(oops)",IDR_WAVE_ABORTED,CBellsNWhistles::CBang::bangResource);
@@ -1033,6 +1033,10 @@ BOOL CWRQSocket::OnTFTP(tftp* p)
1033 if(o.Lookup(tftpoTSize,v)){ 1033 if(o.Lookup(tftpoTSize,v)){
1034 m_xferSize=atoi(v); 1034 m_xferSize=atoi(v);
1035 } 1035 }
1036 if(m_xferSize>=0 && m_xferSize>=(m_blkSize<<16)) {
1037 Deny(tftp::errUndefined,IDS_TFTP_ERROR_TOOBIG);
1038 return TRUE;
1039 }
1036 } 1040 }
1037 UpdateList(); 1041 UpdateList();
1038 DoXfer(); 1042 DoXfer();
@@ -1409,6 +1413,11 @@ tftp::tftpOptions oack;
1409 oack[tftpoXResume]=v; 1413 oack[tftpoXResume]=v;
1410 }else 1414 }else
1411 m_ACK=0; 1415 m_ACK=0;
1416 // XXX: see if we can negotiate the right block size somehow
1417 if(m_xferSize>=0 && m_xferSize>=(m_blkSize<<16)) {
1418 Deny(tftp::errUndefined,IDS_TFTP_ERROR_TOOBIG);
1419 return TRUE;
1420 }
1412 state=stateXfer; 1421 state=stateXfer;
1413 if(oack.GetCount()){ 1422 if(oack.GetCount()){
1414 tftp *p = tftp::Allocate(tftp::tftpOACK::tftpSize(&oack)); 1423 tftp *p = tftp::Allocate(tftp::tftpOACK::tftpSize(&oack));