Fixes invalid write in case of memory exaustion.

This commit is contained in:
Andrea Mazzoleni 2014-11-01 17:52:04 +01:00
parent 0b36b3205c
commit b91ae16e3e

View file

@ -1444,7 +1444,7 @@ static int malloc_printn(int f, size_t value)
int i;
if (!value) {
return write(2, buf, 2);
return write(f, "0", 1);
}
i = sizeof(buf);