diff --git a/contrib/ipfilter/tools/ipf_y.y b/contrib/ipfilter/tools/ipf_y.y index 7feb83e15b8f..fc4884434347 100644 --- a/contrib/ipfilter/tools/ipf_y.y +++ b/contrib/ipfilter/tools/ipf_y.y @@ -2195,6 +2195,10 @@ char *phrase; for (i = 0, s = strtok(phrase, " \r\n\t"); s != NULL; s = strtok(NULL, " \r\n\t"), i++) { fb = reallocarray(fb, i / 4 + 1, sizeof(*fb)); + if (fb == NULL) { + perror("memory allocation error at __LINE__ in __FUNCTION__ in __FILE"); + abort(); + } l = (u_32_t)strtol(s, NULL, 0); switch (i & 3) {