Changeset 14062 in vbox for trunk/src/VBox/Runtime/r3/win
- Timestamp:
- Nov 10, 2008 11:23:05 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/win/dir-win.cpp
r13104 r14062 240 240 241 241 242 RTDECL(int) RTDirRead(PRTDIR pDir, PRTDIRENTRY pDirEntry, unsigned*pcbDirEntry)242 RTDECL(int) RTDirRead(PRTDIR pDir, PRTDIRENTRY pDirEntry, size_t *pcbDirEntry) 243 243 { 244 244 /* … … 255 255 return VERR_INVALID_PARAMETER; 256 256 } 257 unsignedcbDirEntry = sizeof(*pDirEntry);257 size_t cbDirEntry = sizeof(*pDirEntry); 258 258 if (pcbDirEntry) 259 259 { 260 260 cbDirEntry = *pcbDirEntry; 261 if (cbDirEntry < (unsigned)RT_OFFSETOF(RTDIRENTRY, szName[2]))261 if (cbDirEntry < RT_UOFFSETOF(RTDIRENTRY, szName[2])) 262 262 { 263 263 AssertMsgFailed(("Invalid *pcbDirEntry=%d (min %d)\n", *pcbDirEntry, RT_OFFSETOF(RTDIRENTRY, szName[2]))); … … 336 336 337 337 338 RTDECL(int) RTDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry, unsigned*pcbDirEntry, RTFSOBJATTRADD enmAdditionalAttribs)338 RTDECL(int) RTDirReadEx(PRTDIR pDir, PRTDIRENTRYEX pDirEntry, size_t *pcbDirEntry, RTFSOBJATTRADD enmAdditionalAttribs) 339 339 { 340 340 /* … … 357 357 return VERR_INVALID_PARAMETER; 358 358 } 359 unsignedcbDirEntry = sizeof(*pDirEntry);359 size_t cbDirEntry = sizeof(*pDirEntry); 360 360 if (pcbDirEntry) 361 361 { 362 362 cbDirEntry = *pcbDirEntry; 363 if (cbDirEntry < (unsigned)RT_OFFSETOF(RTDIRENTRYEX, szName[2]))363 if (cbDirEntry < RT_UOFFSETOF(RTDIRENTRYEX, szName[2])) 364 364 { 365 365 AssertMsgFailed(("Invalid *pcbDirEntry=%d (min %d)\n", *pcbDirEntry, RT_OFFSETOF(RTDIRENTRYEX, szName[2])));
Note:
See TracChangeset
for help on using the changeset viewer.