Helper: allocate a NUL-terminated buffer of `len` 'x' characters. */
| 923 | |
| 924 | /* Helper: allocate a NUL-terminated buffer of `len` 'x' characters. */ |
| 925 | static char *adr_test_fill(int len) { |
| 926 | char *s = malloc((size_t)len + 1); |
| 927 | if (s) { |
| 928 | memset(s, 'x', (size_t)len); |
| 929 | s[len] = '\0'; |
| 930 | } |
| 931 | return s; |
| 932 | } |
| 933 | |
| 934 | /* Regression: sections whose combined size exceeds the fixed render buffer used |
| 935 | * to overflow it. adr_render_section advanced pos by snprintf's return value |