File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -328,6 +328,10 @@ static void *pt_decompress(void *arg)
328328 if (in -> size < 40 && ctx -> frames == 1 ) {
329329 out -> size = 1024 * 64 ;
330330 } else {
331+ if (in -> size < 14 ) {
332+ result = ERROR (data_error );
333+ goto error_lock ;
334+ }
331335 /* get frame size for output buffer */
332336 unsigned char * src = (unsigned char * )in -> buf + 6 ;
333337 out -> size = (size_t ) MEM_readLE64 (src );
Original file line number Diff line number Diff line change @@ -328,6 +328,10 @@ static void *pt_decompress(void *arg)
328328 if (in -> size < 40 && ctx -> frames == 1 ) {
329329 out -> size = 1024 * 64 ;
330330 } else {
331+ if (in -> size < 14 ) {
332+ result = ERROR (data_error );
333+ goto error_lock ;
334+ }
331335 /* get frame size for output buffer */
332336 unsigned char * src = (unsigned char * )in -> buf + 6 ;
333337 out -> size = (size_t ) MEM_readLE64 (src );
Original file line number Diff line number Diff line change @@ -328,6 +328,10 @@ static void *pt_decompress(void *arg)
328328 if (in -> size < 40 && ctx -> frames == 1 ) {
329329 out -> size = 1024 * 64 ;
330330 } else {
331+ if (in -> size < 14 ) {
332+ result = ERROR (data_error );
333+ goto error_lock ;
334+ }
331335 /* get frame size for output buffer */
332336 unsigned char * src = (unsigned char * )in -> buf + 6 ;
333337 out -> size = (size_t ) MEM_readLE64 (src );
You can’t perform that action at this time.
0 commit comments