Fix a long standing bug in the output buffer size computation.

git cherry-pick -e 2a7f2ae7d4
This commit is contained in:
Carl Shapiro 2010-04-09 18:23:25 -07:00 committed by Brian Carlstrom
parent 4553b08d75
commit 0c0f68e8ff

View file

@ -454,7 +454,7 @@ static void showLog(LogState *state,
numVecs = numLines*3; // 3 iovecs per line.
if (numVecs > INLINE_VECS) {
vec = (struct iovec*)malloc(sizeof(struct iovec)*numLines);
vec = (struct iovec*)malloc(sizeof(struct iovec)*numVecs);
if (vec == NULL) {
msg = "LOG: write failed, no memory";
numVecs = 3;