diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-16 03:43:58 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-16 03:43:58 +0100 |
| commit | e70fff45bcf1de7765252f0a881d7035d022bba9 (patch) | |
| tree | f286dd2f7ac8cb68d6481e6d91a5fd9ed0c596a2 /src | |
| parent | 27e1f73c75e6c0f75d4863cfe2c8e50f811913d9 (diff) | |
Fix horrid memory corruptions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/image.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/image.cc b/src/lib/image.cc index 30dc4292f..ac5962266 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -281,10 +281,10 @@ SimpleImage::SimpleImage (PixelFormat p, Size s, function<int (int)> rounder) _data = (uint8_t **) av_malloc (4 * sizeof (uint8_t *)); _data[0] = _data[1] = _data[2] = _data[3] = 0; - _line_size = (int *) av_malloc (4); + _line_size = (int *) av_malloc (4 * sizeof (int)); _line_size[0] = _line_size[1] = _line_size[2] = _line_size[3] = 0; - _stride = (int *) av_malloc (4); + _stride = (int *) av_malloc (4 * sizeof (int)); _stride[0] = _stride[1] = _stride[2] = _stride[3] = 0; switch (p) { |
