title: Array definition by a function parameter
body: <p>I've never done this, but I'm not sure why the below array definition is wrong.</p>
  
  <p>I have this example code:</p>
  
  <pre><code>typedef struct _SomeObjType {
     int val;
     ...
  } SomeObjType;
  
  static SomeObjType *oObject = NULL;
  oObject = malloc( sizeof(SomeObjType) );
  oObject-&gt;val = 300;
  
  static Err foo (SomeObjType *object) {
     if(object == NULL) 
     return -1;
  
     unsigned char table[object-&gt;val];
     ...
  }
  </code></pre>
  
  <p>Why is the above array definition in <code>foo</code> dangerous?</p>