VirtualBox

Changeset 40121 in vbox


Ignore:
Timestamp:
Feb 14, 2012 7:57:14 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
76263
Message:

NAT: respect return value of TRStrPrintf.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/tftp.c

    r40115 r40121  
    370370                len = RTStrPrintf(buffer, sizeof(buffer), "%s/%s",
    371371                                  tftp_prefix, spt->filename);
     372                if (RT_UNLIKELY(len <= 0))
     373                {
     374                    tftp_send_error(pData, spt, 1, "Filename is invalid", tp);
     375                    return;
     376                }
    372377                if (stat(buffer, &stat_p) == 0)
    373378                    tsize = stat_p.st_size;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette