- Timestamp:
- Oct 3, 2010 8:30:49 PM (14 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VDIHDDCore.cpp
r32688 r32878 290 290 pPreHdr->u32Version = VDI_IMAGE_VERSION; 291 291 memset(pPreHdr->szFileInfo, 0, sizeof(pPreHdr->szFileInfo)); 292 strncat(pPreHdr->szFileInfo, VDI_IMAGE_FILE_INFO, sizeof(pPreHdr->szFileInfo) );292 strncat(pPreHdr->szFileInfo, VDI_IMAGE_FILE_INFO, sizeof(pPreHdr->szFileInfo)-1); 293 293 } 294 294 … … 361 361 AssertMsg(strlen(pszComment) < sizeof(pHeader->u.v1.szComment), 362 362 ("HDD Comment is too long, cb=%d\n", strlen(pszComment))); 363 strncat(pHeader->u.v1.szComment, pszComment, sizeof(pHeader->u.v1.szComment) );363 strncat(pHeader->u.v1.szComment, pszComment, sizeof(pHeader->u.v1.szComment)-1); 364 364 } 365 365 -
trunk/src/VBox/Runtime/testcase/tstLdr-3.cpp
r28800 r32878 139 139 pSym->aSyms[0].szName[0] = '\0'; 140 140 if (pszSymbol) 141 strncat(pSym->aSyms[0].szName, pszSymbol, sizeof(pSym->aSyms[0].szName) );141 strncat(pSym->aSyms[0].szName, pszSymbol, sizeof(pSym->aSyms[0].szName)-1); 142 142 } 143 143 … … 157 157 pSym->aSyms[1].szName[0] = '\0'; 158 158 if (pszSymbol) 159 strncat(pSym->aSyms[1].szName, pszSymbol, sizeof(pSym->aSyms[1].szName) );159 strncat(pSym->aSyms[1].szName, pszSymbol, sizeof(pSym->aSyms[1].szName)-1); 160 160 } 161 161
Note:
See TracChangeset
for help on using the changeset viewer.