title: Why does fread segfault?
body: <p>I have been tasked with implementing an ls function for files in an .iso file system. I need to use fread but it is segfaulting. I know the file exists and i know it has data in it. I have the format for calling fread and I have set it up as follows</p>
  
  <pre><code>static void ls(File *file, int32_t root_dir_size)
  {
     void* sector;
     int result;
     result = fread(sector, 1, 1, file);
  }
  </code></pre>
  
  <p>Why does this segfault? I am new to C and I am coming from C++ so not sure what I am missing here.</p>