version 1.1.1.2, 2013/07/21 23:54:39
|
version 1.1.1.3, 2016/11/02 10:09:10
|
Line 148 buffer_add (struct buffer *b)
|
Line 148 buffer_add (struct buffer *b)
|
{ |
{ |
struct buffer_data *d; |
struct buffer_data *d; |
|
|
d = XMALLOC(MTYPE_BUFFER_DATA, offsetof(struct buffer_data, data[b->size])); | d = XMALLOC(MTYPE_BUFFER_DATA, offsetof(struct buffer_data, data) + b->size); |
d->cp = d->sp = 0; |
d->cp = d->sp = 0; |
d->next = NULL; |
d->next = NULL; |
|
|
Line 322 buffer_flush_window (struct buffer *b, int fd, int wid
|
Line 322 buffer_flush_window (struct buffer *b, int fd, int wid
|
/* This should absolutely never occur. */ |
/* This should absolutely never occur. */ |
zlog_err("%s: corruption detected: iov_small overflowed; " |
zlog_err("%s: corruption detected: iov_small overflowed; " |
"head %p, tail %p, head->next %p", |
"head %p, tail %p, head->next %p", |
__func__, b->head, b->tail, b->head->next); | __func__, (void *)b->head, (void *)b->tail, |
| (void *)b->head->next); |
iov = XMALLOC(MTYPE_TMP, iov_alloc*sizeof(*iov)); |
iov = XMALLOC(MTYPE_TMP, iov_alloc*sizeof(*iov)); |
memcpy(iov, small_iov, sizeof(small_iov)); |
memcpy(iov, small_iov, sizeof(small_iov)); |
} |
} |