title: Buffer Overflow with size_t in C
body: <p>why does the following code can lead to a buffer overflow? I know the problem is with the <code>size_t</code>. But I don't know why. Could someone explain it to me?</p>
  <pre><code>#include &lt;stddef.h&gt;
  #define COLS 5
  #define ROWS 7
  static int matrix[ROWS][COLS];
   
  void init_matrix(int x) {
    for (size_t i = 0; i &lt; COLS; i++) {
      for (size_t j = 0; j &lt; ROWS; j++) {
        matrix[i][j] = x;
      }
    }
  }
  </code></pre>