Changeset 19928 in vbox for trunk/src/VBox/Runtime/r3
- Timestamp:
- May 22, 2009 11:47:35 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 47630
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/path.cpp
r19926 r19928 729 729 730 730 731 RTDECL(int) RTPathAppend(char *pszPath, size_t c chPath, const char *pszAppend)732 { 733 char *pszPathEnd = (char *)memchr(pszPath, '\0', c chPath);731 RTDECL(int) RTPathAppend(char *pszPath, size_t cbPathDst, const char *pszAppend) 732 { 733 char *pszPathEnd = (char *)memchr(pszPath, '\0', cbPathDst); 734 734 AssertReturn(pszPathEnd, VERR_INVALID_PARAMETER); 735 735 … … 744 744 if (pszPathEnd == pszPath) 745 745 { 746 if (cchAppend >= c chPath)746 if (cchAppend >= cbPathDst) 747 747 return VERR_BUFFER_OVERFLOW; 748 748 memcpy(pszPath, pszAppend, cchAppend + 1); … … 762 762 && RT_C_IS_ALPHA(pszPath[0])) 763 763 { 764 if ((size_t)(pszPathEnd - pszPath) + cchAppend >= c chPath)764 if ((size_t)(pszPathEnd - pszPath) + cchAppend >= cbPathDst) 765 765 return VERR_BUFFER_OVERFLOW; 766 766 } … … 768 768 #endif 769 769 { 770 if ((size_t)(pszPathEnd - pszPath) + 1 + cchAppend >= c chPath)770 if ((size_t)(pszPathEnd - pszPath) + 1 + cchAppend >= cbPathDst) 771 771 return VERR_BUFFER_OVERFLOW; 772 772 *pszPathEnd++ = '/'; … … 779 779 pszAppend++, cchAppend--; 780 780 781 if ((size_t)(pszPathEnd - pszPath) + cchAppend >= c chPath)781 if ((size_t)(pszPathEnd - pszPath) + cchAppend >= cbPathDst) 782 782 return VERR_BUFFER_OVERFLOW; 783 783 } … … 796 796 pszPathEnd--; 797 797 798 if ((size_t)(pszPathEnd - pszPath) + cchAppend >= c chPath)798 if ((size_t)(pszPathEnd - pszPath) + cchAppend >= cbPathDst) 799 799 return VERR_BUFFER_OVERFLOW; 800 800 }
Note:
See TracChangeset
for help on using the changeset viewer.