Decoding large image consumes large size of memory, so insufficient memory tends to occur on 32bit process.
In an out of memory situation, de265_image::alloc_image() may fail to allocate memory and returns DE265_ERROR_OUT_OF_MEMORY.
But [decoded_picture_buffer::new_image() ignores DE265_ERROR_OUT_OF_MEMORY  from de265_image::alloc_image()](https://github.com/strukturag/libde265/blob/e587ef6e8000662b91c35ccb866c2374d3a40e27/libde265/dpb.cc#L262),
so a NULL pointer access occurs in [de265_image::set_SliceAddrRS()](https://github.com/strukturag/libde265/blob/e587ef6e8000662b91c35ccb866c2374d3a40e27/libde265/image.h#L716).

I think that decoded_picture::new_image() should return -1 when de265_image::alloc_image() returned DE265_ERROR_OUT_OF_MEMORY.

- Test Version:  1.0.8
- Test Environment: 
   - Compiler: Visual Studio 2017 
       - Platform: Win32
   - OS: Windows 10 Enterprise 64bit
   - CPU: Intel(R) Xeon(R) E-2124G CPU @ 3.40GHz   3.41 GHz
   - RAM: 32GB 
   - Using libde265 from libheif.
   
- Image: 
   - Format: HEIF
   - Width : 32768
   - Height: 32768
   - Channels: YCbCr
   - Bits/Sample: 8
  
  

A memory allocation error is not handled
This is a GitHub Issue
repo:libde265
owner:strukturag
Title : A memory allocation error is not handled
Issue date:

--- start body ---
Decoding large image consumes large size of memory, so insufficient memory tends to occur on 32bit process.
In an out of memory situation, de265_image::alloc_image() may fail to allocate memory and returns DE265_ERROR_OUT_OF_MEMORY.
But [decoded_picture_buffer::new_image() ignores DE265_ERROR_OUT_OF_MEMORY  from de265_image::alloc_image()](https://github.com/strukturag/libde265/blob/e587ef6e8000662b91c35ccb866c2374d3a40e27/libde265/dpb.cc#L262),
so a NULL pointer access occurs in [de265_image::set_SliceAddrRS()](https://github.com/strukturag/libde265/blob/e587ef6e8000662b91c35ccb866c2374d3a40e27/libde265/image.h#L716).

I think that decoded_picture::new_image() should return -1 when de265_image::alloc_image() returned DE265_ERROR_OUT_OF_MEMORY.

- Test Version:  1.0.8
- Test Environment: 
   - Compiler: Visual Studio 2017 
       - Platform: Win32
   - OS: Windows 10 Enterprise 64bit
   - CPU: Intel(R) Xeon(R) E-2124G CPU @ 3.40GHz   3.41 GHz
   - RAM: 32GB 
   - Using libde265 from libheif.
   
- Image: 
   - Format: HEIF
   - Width : 32768
   - Height: 32768
   - Channels: YCbCr
   - Bits/Sample: 8
  
  

--- end body ---
