From df07266ffd30d2a2a57dbb60d3cdb16670cfe84f Mon Sep 17 00:00:00 2001 From: Deface <32715156+FollowMeDown@users.noreply.github.com> Date: Thu, 12 Mar 2020 14:58:58 +0000 Subject: [PATCH] Update meltdown.c --- meltdown.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/meltdown.c b/meltdown.c index 5fc51aa..714a5d2 100644 --- a/meltdown.c +++ b/meltdown.c @@ -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 @@ -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]; } @@ -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]); - } } }