Unified · Split
| @@ -348,7 +348,9 @@ void __bound_init(void) · 347 unmodified lines | |||
| 348 | int i; | 348 | int i; |
| 349 | BoundEntry *page; | 349 | BoundEntry *page; |
| 350 | unsigned long start, size; | 350 | unsigned long start, size; |
| 351 | int *p; | 351 | |
| 352 | /* int *p; */ | ||
| 353 | __PTRDIFF_TYPE__ *p; /* 32 or 64 bit integer */ | ||
| 352 | 354 | ||
| 353 | /* save malloc hooks and install bound check hooks */ | 355 | /* save malloc hooks and install bound check hooks */ |
| 354 | install_malloc_hooks(); | 356 | install_malloc_hooks(); |
| @@ -411,7 +413,7 @@ void __bound_init(void) · 56 unmodified lines | |||
| 411 | #endif | 413 | #endif |
| 412 | 414 | ||
| 413 | /* add all static bound check values */ | 415 | /* add all static bound check values */ |
| 414 | p = (int *)&__bounds_start; | 416 | p = (__PTRDIFF_TYPE__ *)&__bounds_start; |
| 415 | while (p[0] != 0) { | 417 | while (p[0] != 0) { |
| 416 | __bound_new_region((void *)p[0], p[1]); | 418 | __bound_new_region((void *)p[0], p[1]); |
| 417 | p += 2; | 419 | p += 2; |