##// END OF EJS Templates
bdiff: handle the possibility of an integer overflow when allocating...
Alex Gaynor -
r35695:cf2e2a73 default
parent child Browse files
Show More
@@ -41,7 +41,7 b' int bdiff_splitlines(const char *a, ssiz'
41 41 if (p == plast)
42 42 i++;
43 43
44 *lr = l = (struct bdiff_line *)malloc(sizeof(struct bdiff_line) * i);
44 *lr = l = (struct bdiff_line *)calloc(i, sizeof(struct bdiff_line));
45 45 if (!l)
46 46 return -1;
47 47
General Comments 0
You need to be logged in to leave comments. Login now