Skip to content

Commit

Permalink
Fix a long standing bug in the output buffer size computation.
Browse files Browse the repository at this point in the history
git cherry-pick -e 2a7f2ae
  • Loading branch information
Carl Shapiro authored and bdcgoogle committed Aug 18, 2010
1 parent 4553b08 commit 0c0f68e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion liblog/fake_log_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0c0f68e

Please sign in to comment.