mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 14:34:33 +02:00
fix some warnings from static analysis
http://code.google.com/p/webp/issues/detail?id=138 Change-Id: I21470e965357cc14eab356e2c477c7846ff76ef2
This commit is contained in:
@ -43,7 +43,10 @@ static int BitWriterResize(VP8BitWriter* const bw, size_t extra_size) {
|
||||
bw->error_ = 1;
|
||||
return 0;
|
||||
}
|
||||
memcpy(new_buf, bw->buf_, bw->pos_);
|
||||
if (bw->pos_ > 0) {
|
||||
assert(bw->buf_ != NULL);
|
||||
memcpy(new_buf, bw->buf_, bw->pos_);
|
||||
}
|
||||
free(bw->buf_);
|
||||
bw->buf_ = new_buf;
|
||||
bw->max_pos_ = new_size;
|
||||
|
Reference in New Issue
Block a user