title: Heap-buffer-overflow when printf the content in 3d pointer array
body: <p>In the below code, if I add the last <code>printf</code> line, I get a heap-buffer-overflow error. Why does this happen? And how can I print the stuff saved in <code>a2</code>?</p>
  <pre><code>char ***a2 = (char***)malloc(10 * sizeof(char**));
  char **a1 = (char**)malloc(10 * sizeof(char*));
  a1[0] = (char*)malloc(10 * sizeof(char));
  memset(a1[0], '#', 10);
  a1[1] = (char*)malloc(10 * sizeof(char));
  memset(a1[1], '=', 10);
  a2[0] = a1;
  printf(&quot;%s&quot;, a2[0][0]);  &lt;---- error
  </code></pre>