Changeset 91623 in vbox for trunk/src/VBox/Devices/Network/slirp
- Timestamp:
- Oct 7, 2021 9:03:15 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 147348
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/tftp.c
r82968 r91623 65 65 { 66 66 int fInUse; 67 unsigned char pszFilename[TFTP_FILENAME_MAX];68 67 struct in_addr IpClientAddress; 69 68 uint16_t u16ClientPort; … … 75 74 TFPTPSESSIONOPTDESC OptionTSize; 76 75 TFPTPSESSIONOPTDESC OptionTimeout; 76 77 char szFilename[TFTP_FILENAME_MAX]; 77 78 } TFTPSESSION, *PTFTPSESSION, **PPTFTPSESSION; 78 79 … … 151 152 else 152 153 { 153 char *pszFullPathAbs = RTPathAbsExDup(tftp_prefix, (const char *)pcTftpSession->pszFilename, RTPATH_STR_F_STYLE_HOST);154 char *pszFullPathAbs = RTPathAbsExDup(tftp_prefix, pcTftpSession->szFilename, RTPATH_STR_F_STYLE_HOST); 154 155 155 156 if ( !pszFullPathAbs … … 289 290 break; 290 291 291 if (RTStrNLen( (char *)pTftpSession->pszFilename, TFTP_FILENAME_MAX) == 0)292 { 293 rc = RTStrCopy( (char *)pTftpSession->pszFilename, TFTP_FILENAME_MAX, pszTftpRRQRaw);292 if (RTStrNLen(pTftpSession->szFilename, TFTP_FILENAME_MAX) == 0) 293 { 294 rc = RTStrCopy(pTftpSession->szFilename, TFTP_FILENAME_MAX, pszTftpRRQRaw); 294 295 if (RT_FAILURE(rc)) 295 296 { … … 424 425 LogFlowFuncEnter(); 425 426 426 cchSessionFilename = RTStrPrintf2(szSessionFilename, TFTP_FILENAME_MAX, "%s/%s", tftp_prefix, pTftpSession-> pszFilename);427 cchSessionFilename = RTStrPrintf2(szSessionFilename, TFTP_FILENAME_MAX, "%s/%s", tftp_prefix, pTftpSession->szFilename); 427 428 if (cchSessionFilename > 0) 428 429 { … … 438 439 rc = VERR_FILENAME_TOO_LONG; 439 440 if (fVerbose) 440 LogRel(("NAT TFTP: %s/%s -> %Rrc\n", tftp_prefix, pTftpSession-> pszFilename, rc));441 LogRel(("NAT TFTP: %s/%s -> %Rrc\n", tftp_prefix, pTftpSession->szFilename, rc)); 441 442 LogFlowFuncLeaveRC(rc); 442 443 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.