Skip to content

Commit 0e2aadb

Browse files
committed
0.9.8
1 parent 149df08 commit 0e2aadb

File tree

6 files changed

+18
-5
lines changed

6 files changed

+18
-5
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
version 0.9.8:
2+
3+
- x265 library compilation fixes
4+
- buffer overflow fixes
5+
16
version 0.9.7:
27

38
- Increased the memory size of the JS decoder to 32 MiB and avoid

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.7
1+
0.9.8

bpgenc.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,14 @@ Image *image_alloc(int w, int h, BPGImageFormatEnum format, int has_alpha,
688688
{
689689
Image *img;
690690
int i, linesize, w1, h1, c_count;
691+
uint64_t size;
692+
693+
/* XXX: support large images ? */
694+
size = (uint64_t)w * (uint64_t)h * 2;
695+
if (size > INT32_MAX) {
696+
fprintf(stderr, "Image is too large\n");
697+
exit(1);
698+
}
691699

692700
img = malloc(sizeof(Image));
693701
memset(img, 0, sizeof(*img));
@@ -1088,7 +1096,7 @@ Image *read_png(BPGMetaData **pmd,
10881096

10891097
static BPGMetaData *jpeg_get_metadata(jpeg_saved_marker_ptr first_marker)
10901098
{
1091-
static const char app1_exif[] = "Exif";
1099+
static const char app1_exif[] = "Exif\0";
10921100
static const char app1_xmp[] = "http://ns.adobe.com/xap/1.0/";
10931101
static const char app2_iccp[] = "ICC_PROFILE";
10941102
jpeg_saved_marker_ptr marker;

libbpg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ static int build_msps(uint8_t **pbuf, int *pbuf_len,
232232
input_data += len;
233233
input_data_len -= len;
234234

235-
buf_len = 4 + 2 + msps_len * 2 + 4 + (input_data_len - len);
235+
buf_len = 4 + 2 + msps_len * 2;
236236
buf = av_malloc(buf_len);
237237

238238
idx = 0;

x265/source/common/param.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,7 @@ char *x265_param2string(x265_param* p)
13961396
return NULL;
13971397

13981398
#define BOOL(param, cliopt) \
1399-
s += sprintf(s, " %s", (param) ? cliopt : "no-"cliopt);
1399+
s += sprintf(s, " %s", (param) ? cliopt : "no-" cliopt);
14001400

14011401
s += sprintf(s, "%dx%d", p->sourceWidth,p->sourceHeight);
14021402
s += sprintf(s, " fps=%u/%u", p->fpsNum, p->fpsDenom);

x265/source/encoder/ratecontrol.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace {
4949
{\
5050
bErr = 0;\
5151
p = strstr(opts, opt "=");\
52-
char* q = strstr(opts, "no-"opt);\
52+
char* q = strstr(opts, "no-" opt);\
5353
if (p && sscanf(p, opt "=%d" , &i) && param_val != i)\
5454
bErr = 1;\
5555
else if (!param_val && !q && !p)\

0 commit comments

Comments
 (0)