title: Patching a simple c program with IDA PRO get segmentation fault
body: <p>This is my program:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(){
    int var=5;
    if(var==5) printf("Accesso effettuato!");
    else printf("Access denied");
  
  }
  </code></pre>
  
  <p>I change the op code... in the hex edit like in this image but when I run my program I get a segmentation fault.</p>
  
  <p><img src="https://i.stack.imgur.com/U8Hqc.png" alt="image1"></p>
  
  <p><img src="https://i.stack.imgur.com/xBzzW.png" alt="image2"></p>
  
  <p><img src="https://i.stack.imgur.com/6dVi6.png" alt="enter image description here"></p>