title: Bad value while parsing tar header
body: <p>I'm trying to program the tar function but i have some problem.
  I want to read my tar file and parse header data.
  here is my structure</p>
  
  <pre><code>struct header { 
      char nom[100];
      char droits[3];
      char taille[12];
      char date_modif[12];
      char type[1];
  };
  </code></pre>
  
  <p>And now my code to parse header data :</p>
  
  <pre><code>while ( fread(head.nom, 100, 1, archive) != 0 ){
  
      printf("NOM : %s\n", head.nom);
  
  
      //droits
      fread(head.droits, 3, 1, archive);
  
  
      printf("DROITS : %s\n", head.droits);
  
      //taille
      fread(head.taille, 12, 1, archive);
  
      printf("TAILLE : %s\n", head.taille);
  
  
      //last modif
      fread(head.date_modif, 12, 1, archive);
  
      printf("MODIF : %s\n", head.date_modif);
  
  
      //type
      fread(head.type, 1, 1, archive);
  
      printf("TYPE : %s\n", head.type);
  
      printf("NOM : %s\n", head.nom);
  
      exit(1);
      // on se place a la fin du premier fichier
      fseek(archive, oct2dec(atoi(head.taille)), SEEK_CUR);
  
  
      //fprintf(stdout, "%s %d \n", head.nom, oct2dec(atoi(head.taille)));        
  
      i++;
  }
  </code></pre>
  
  <p>And the result is : </p>
  
  <pre><code>NOM : a.txt...............................................................................................
  DROITS : 664
  TAILLE : 936.........
  MODIF : 1352910882..
  TYPE : 1
  NOM : a.txt...............................................................................................664936.........1352910882..1
  </code></pre>
  
  <p>My problem is that the last line display all my data and I want to display only a.txt.... (like in the first line).
  How can I do to fix this problem ?</p>
  
  <p>Thanks</p>