News for hackers. Stuff that matters.
Re:GCC's new fortification level: The gains and costs by amag on Monday September 19, 2022 @09:19AM (#32897911)
ASFAIU the problem was that the application in question kept using oldptr, e.g.:

   int *oldptr = (int *)malloc(42);
   int *newptr = (int *)realloc(oldptr, 73);

   if (oldptr == newptr) {
     newptr[70] = 10; // ok because the "object" newptr can contain 73 ints
     oldptr[70] = 10; // SIGABRT here because the "object" oldptr can only contain 42 ints even though the memory block oldptr points to can hold 73
   }

There are no comments on this comment yet.