1. 2
  1.  

  2. 1

    On this post I commented that it can be easy to replace VLAs with a malloced pointer to a VLA, I ended up however multiplying to calculate the size, and as @calvin pointed out, that can lead to trouble if the multiplication overflows. What I didn’t know was that you can just use sizeof(VLA) as this article points out.