diff --git a/examples/random/random_main.c b/examples/random/random_main.c
index ae3c482078901c91c22bf39d526df4ea6c8b035f..d272a9f8ae0fa5c2c3967da229f47ac297349b34 100644
--- a/examples/random/random_main.c
+++ b/examples/random/random_main.c
@@ -41,6 +41,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <fcntl.h>
 #include <errno.h>
 #include <debug.h>
@@ -94,13 +95,17 @@ int rand_main(int argc, char *argv[])
       nsamples  = atoi(argv[1]);
     }
 
-  /* Clip the numer of samples to the configured buffer size */
+  /* Clip the number of samples to the configured buffer size */
 
   if (nsamples > CONFIG_EXAMPLES_MAXSAMPLES)
     {
       nsamples = CONFIG_EXAMPLES_MAXSAMPLES;
     }
 
+  /* fill buffer to make it super-clear as to what has and has not been written */
+
+  memset(buffer,0xcc,sizeof(buffer));
+
   /* Open /dev/random */
 
   fd = open("/dev/random", O_RDONLY);
@@ -114,6 +119,7 @@ int rand_main(int argc, char *argv[])
   /* Read the requested number of samples */
 
   printf("Reading %d random numbers\n", nsamples);
+  fflush(stdout);
   nread = read(fd, buffer, nsamples * sizeof(uint32_t));
   if (nread < 0)
     {
@@ -122,6 +128,12 @@ int rand_main(int argc, char *argv[])
       (void)close(fd);
       exit(EXIT_FAILURE);
     }
+  if (nread != nsamples * sizeof(uint32_t))
+    {
+      fprintf(stderr, "ERROR: Read from /dev/randon only produced %d bytes\n", nread);
+      (void)close(fd);
+      exit(EXIT_FAILURE);
+    }
 
   /* Dump the sample buffer */