title: functions returning char pointer
body: <p>I came across lot of functions returning char pointers in one legacy application.
  Some of them returning pointers to local character arrays. It seems to be causing crashes after several invocations(not immediately!) see the usage below</p>
  
  <pre><code>char *f1(){
    char buff[20];
    char *ptr;
  
    ----
    ----
    ptr=buff;
   return ptr;
  }
  
  ---
  ---
  
  f2(f1());
  </code></pre>
  
  <p>f1() returns a pointer local variable and then passes it to another function. I got the crash directly when it's compiled using _DEBUG mode in MS DEV. But in release mode, it doesnt cause an immediate crash, but it might occur after making lots of such calls.</p>
  
  <p>When I modified the usage as below, it's working without any issues. Is the following usage 
  safe?</p>
  
  <pre><code>strcpy(arr,f1()); /* arr is fixed char array*/
  f2(arr);
  </code></pre>