VirtualBox

vbox的更動 63279 路徑 trunk/src/VBox/NetworkServices


忽略:
時間撮記:
2016-8-10 下午02:41:40 (8 年 以前)
作者:
vboxsync
訊息:

proxy_tftpd.c: Our RTStrPrintf sucks a little, sorry.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/NetworkServices/NAT/proxy_tftpd.c

    r62481 r63279  
    282282
    283283            if (xfer->oack != NULL) {
    284                 pbuf_realloc(xfer->oack, xfer->oack->len - len);
     284                Assert((u16_t)(xfer->oack->len - len) == xfer->oack->len - len);
     285                pbuf_realloc(xfer->oack, (u16_t)(xfer->oack->len - len));
    285286            }
    286287        }
     
    618619    }
    619620
    620     status = RTStrPrintf(pathname, len, "%s/%s", tftpd.root, xfer->filename);
    621     if (status < 0) {
    622         return tftp_internal_error(xfer);
    623     }
     621    RTStrPrintf(pathname, len, "%s/%s", tftpd.root, xfer->filename);
     622/** @todo fix RTStrPrintf because this does not currently work:
     623 *   status = RTStrPrintf(pathname, len, "%s/%s", tftpd.root, xfer->filename);
     624 *   if (status < 0) {
     625 *       return tftp_internal_error(xfer);
     626 *   }
     627 */
    624628
    625629    DPRINTF(("%s: full pathname: %s\n", __func__, pathname));
     
    821825    int sz;
    822826
    823     sz = RTStrPrintf(*ps, *plen, "%s", optname);
    824     if (sz < 0 || (size_t)sz >= *plen) {
     827/** @todo Fix RTStrPrintf because this doesn't really work.
     828 *   sz = RTStrPrintf(*ps, *plen, "%s", optname);
     829 *   if (sz < 0 || (size_t)sz >= *plen) {
     830 *       return -1;
     831 *   } */
     832    sz = (int)RTStrPrintf(*ps, *plen, "%s", optname);
     833    if (/*sz < 0 ||*/ (size_t)sz >= *plen) {
    825834        return -1;
    826835    }
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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