title: code gives error Segmentation fault (core dumped), if location is changed
body: <p>I am trying to customize the header of a type1 font file by changing some text from 6th byte to 20th byte as mentioned in code below. </p>
  
  <p>Currently font file contains this text in 6-20 bytes "%!PS-AdobeFont", i am modifying it to "%!PS-RoughFont". Its working fine, but as soon as i install this font file in fonts folder where all fonts are installed and run the same code it gives me error  "<strong>Segmentation fault (core dumped)</strong>"</p>
  
  <p>why is this error coming i mean same code working in other location. P.S i am using linux OS. Is it something to the permissions of this directory as it allows only read permission.</p>
  
  <p>Code</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main ()
  {
   FILE *fp;
  
   fp = fopen("/usr/share/fonts/type1/gsfonts/test.pfb","r+");
  
   fseek(fp, 6, 0);
   fputs("%!PS-AdobeFont", fp);
   fclose(fp);
  
   return(0);
  }
  </code></pre>