Since variable length arrays result in suboptimal code, avoid using
variable length arrays.
Cc: Patrick McCormick <patrick.m.mccormick@intel.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void d(unsigned char *buf, int len, int width, int group)
{
int i, offset = 0, line_done = 0;
- char ascii[width + 1];
+ char ascii[32 + 1];
+ assert(width < sizeof(ascii));
printf(" ");
for (i = 0; i <= 15; i++)
printf("%3x", i);