Changeset 451 for branches/branch-1-0/src/helpers/xprf.c
- Timestamp:
- Jul 4, 2021, 3:54:01 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1-0/src/helpers/xprf.c
r391 r451 74 74 75 75 /* 76 * Copyright (C) 2000-20 11 Ulrich Mller.76 * Copyright (C) 2000-2021 Ulrich Mller. 77 77 * This file is part of the "XWorkplace helpers" source package. 78 78 * This is free software; you can redistribute it and/or modify … … 402 402 * 403 403 *@@changed V1.0.0 (2002-09-17) [umoeller]: now returning APIRET 404 *@@changed WarpIN V1.0.25 (2021-07-04) [pr]: add limit checking 404 405 */ 405 406 … … 432 433 &cbRead))) 433 434 { 434 if (cbRead != fs3.cbFile )435 if (cbRead != fs3.cbFile || cbRead < sizeof(INIFILE_HEADER)) 435 436 arc = ERROR_NO_DATA; 436 437 else … … 442 443 443 444 // create-applications loop 444 while ((ulAppOfs) && ( !arc))445 while ((ulAppOfs) && (ulAppOfs + sizeof(INIFILE_APP) <= cbRead) && (!arc)) 445 446 { 446 447 // application struct … … 455 456 456 457 // create-keys loop 457 while ((ulKeysOfs) && ( !arc))458 while ((ulKeysOfs) && (ulKeysOfs + sizeof(INIFILE_KEY) <= cbRead) && (!arc)) 458 459 { 459 460 PINIFILE_KEY pKey = (PINIFILE_KEY)(pbFileData + ulKeysOfs);
Note:
See TracChangeset
for help on using the changeset viewer.