Changeset 95328 in vbox for trunk/src/VBox/Additions/common/pam/pam_vbox.cpp
- Timestamp:
- Jun 21, 2022 2:42:41 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/pam/pam_vbox.cpp
r95327 r95328 503 503 uint32_t cbBuf = GUEST_PROP_MAX_NAME_LEN + GUEST_PROP_MAX_VALUE_LEN + GUEST_PROP_MAX_FLAGS_LEN + _1K; 504 504 505 for (int i = 0; i < 10; i++)505 for (int i = 0; ; i++) 506 506 { 507 507 void *pvTmpBuf = RTMemRealloc(pvBuf, cbBuf); … … 518 518 &pszName, &pszValue, &u64TimestampOut, 519 519 &pszFlags, &cbBuf, NULL /* pfWasDeleted */); 520 if (rc == VERR_BUFFER_OVERFLOW && i < 10) 521 { 522 cbBuf += _1K; /* Buffer too small, try it with a bigger one more time. */ 523 continue; 524 } 520 525 } 521 526 else 522 527 rc = VERR_NO_MEMORY; 523 524 if (rc == VERR_BUFFER_OVERFLOW)525 {526 /* Buffer too small, try it with a bigger one next time. */527 cbBuf += _1K;528 continue; /* Try next round. */529 }530 531 /* Everything except VERR_BUFFER_OVERLOW makes us bail out ... */532 528 break; 533 529 } 534 530 531 RTMemFree(pvBuf); 535 532 return rc; 536 533 }
Note:
See TracChangeset
for help on using the changeset viewer.