diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index ad213c8..fad3887 100644
|
a
|
b
|
static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDis
|
| 789 | 789 | y_pos++; |
| 790 | 790 | |
| 791 | 791 | while (buf < buf_end) { |
| 792 | | if (x_pos > region->width || y_pos > region->height) { |
| | 792 | if (x_pos >= region->width || y_pos > region->height) { |
| 793 | 793 | av_log(avctx, AV_LOG_ERROR, "Invalid object location!\n"); |
| 794 | 794 | return; |
| 795 | 795 | } |
| … |
… |
static void dvbsub_parse_region_segment(AVCodecContext *avctx,
|
| 1039 | 1039 | if (region->width * region->height != region->buf_size) { |
| 1040 | 1040 | av_free(region->pbuf); |
| 1041 | 1041 | |
| 1042 | | region->buf_size = region->width * region->height; |
| | 1042 | region->buf_size = region->width * (region->height + 1); |
| 1043 | 1043 | |
| 1044 | 1044 | region->pbuf = av_malloc(region->buf_size); |
| 1045 | 1045 | |