Overview
Comment: | OFMapTable: More overflow checks. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6085d4f6a4756ba510e143e807029b1b |
User & Date: | js on 2013-12-01 11:51:03 |
Other Links: | manifest | tags |
Context
2013-12-01
| ||
12:12 | Make OFMapTableEnumeratorWrapper private. check-in: d7b691c402 user: js tags: trunk | |
11:51 | OFMapTable: More overflow checks. check-in: 6085d4f6a4 user: js tags: trunk | |
11:51 | OFException: Do not show <??+offset>. check-in: 353b3ba81d user: js tags: trunk | |
Changes
Modified src/OFMapTable.m from [74b5d78ed2] to [484e7b21c8].
︙ | |||
135 136 137 138 139 140 141 | 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | - - + - + + + + + + + + - + | SET_DEFAULT(_valueFunctions.retain, default_retain); SET_DEFAULT(_valueFunctions.release, default_release); SET_DEFAULT(_valueFunctions.hash, default_hash); SET_DEFAULT(_valueFunctions.equal, default_equal); #undef SET_DEFAULT |
︙ | |||
292 293 294 295 296 297 298 | 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 | - + - - + + + + - + | } - (void)OF_resizeForCount: (uint32_t)count { uint32_t i, fullness, capacity; struct of_map_table_bucket **buckets; |
︙ | |||
334 335 336 337 338 339 340 | 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | - - | if (j >= last) { last = _buckets[i]->hash & (capacity - 1); for (j = 0; j < last && buckets[j] != NULL; j++); } |
︙ | |||
456 457 458 459 460 461 462 463 464 465 466 467 468 469 | 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 | + + - | last = _capacity; for (i = hash & (_capacity - 1); i < last && _buckets[i] != NULL; i++) { if (_buckets[i] == &deleted) continue; if (_keyFunctions.equal(_buckets[i]->key, key)) { _mutations++; _keyFunctions.release(_buckets[i]->key); _valueFunctions.release(_buckets[i]->value); [self freeMemory: _buckets[i]]; _buckets[i] = &deleted; _count--; |
︙ |