Skip to content

Commit 0ddec13

Browse files
authored
Merge branch 'main' into fix_ossfuzz_439237843
2 parents cdccb84 + ac3d491 commit 0ddec13

File tree

3 files changed

+60
-6
lines changed

3 files changed

+60
-6
lines changed

src/lib/OpenEXRCore/internal_ht.cpp

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class staticmem_outfile : public ojph::outfile_base
6363
* @param ptr is a pointer to new data.
6464
* @param size the number of bytes in the new data.
6565
*/
66-
size_t write (const void* ptr, size_t sz)
66+
size_t write (const void* ptr, size_t sz) override
6767
{
6868
assert (this->is_open);
6969
assert (this->buf);
@@ -157,8 +157,8 @@ class staticmem_outfile : public ojph::outfile_base
157157
ojph::ui8 *cur_ptr;
158158
};
159159

160-
extern "C" exr_result_t
161-
internal_exr_undo_ht (
160+
static exr_result_t
161+
ht_undo_impl (
162162
exr_decode_pipeline_t* decode,
163163
const void* compressed_data,
164164
uint64_t comp_buf_size,
@@ -328,7 +328,31 @@ internal_exr_undo_ht (
328328
}
329329

330330
extern "C" exr_result_t
331-
internal_exr_apply_ht (exr_encode_pipeline_t* encode)
331+
internal_exr_undo_ht (
332+
exr_decode_pipeline_t* decode,
333+
const void* compressed_data,
334+
uint64_t comp_buf_size,
335+
void* uncompressed_data,
336+
uint64_t uncompressed_size)
337+
{
338+
try
339+
{
340+
return ht_undo_impl (decode, compressed_data, comp_buf_size,
341+
uncompressed_data, uncompressed_size);
342+
}
343+
catch ( ... )
344+
{
345+
}
346+
347+
return EXR_ERR_CORRUPT_CHUNK;
348+
}
349+
350+
351+
////////////////////////////////////////
352+
353+
354+
static exr_result_t
355+
ht_apply_impl (exr_encode_pipeline_t* encode)
332356
{
333357
exr_result_t rv = EXR_ERR_SUCCESS;
334358

@@ -503,3 +527,17 @@ internal_exr_apply_ht (exr_encode_pipeline_t* encode)
503527

504528
return rv;
505529
}
530+
531+
extern "C" exr_result_t
532+
internal_exr_apply_ht (exr_encode_pipeline_t* encode)
533+
{
534+
try
535+
{
536+
return ht_apply_impl (encode);
537+
}
538+
catch ( ... )
539+
{
540+
}
541+
542+
return EXR_ERR_INCORRECT_CHUNK;
543+
}

website/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ arrays.
7878
Quick Start
7979
===========
8080

81+
You can :doc:`install <install>` OpenEXR using package managers or
82+
build the library yourself from the `source on github <https://github.com/AcademySoftwareFoundation/openexr>`_
83+
following the :ref:`compile instructions <build-from-source>`
84+
8185
For a simple program that uses the C++ API to read and write a ``.exr`` file, see the
8286
:doc:`HelloWorld` examples.
8387

website/install.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ Install via `vcpkg <https://vcpkg.io/en/packages>`_:
6666
% .\vcpkg install openexr
6767
6868
69+
.. _build-from-source:
70+
6971
Build from Source
7072
-----------------
7173

@@ -76,8 +78,18 @@ Download the source from the `GitHub releases page
7678
<https://github.com/AcademySoftwareFoundation/openexr/releases>`_
7779
page, or clone the `repo <https://github.com/AcademySoftwareFoundation/openexr>`_.
7880

79-
The ``release`` branch of the repo always points to the most advanced
80-
release.
81+
If cloning the repo, check out the ``release`` branch:
82+
83+
.. code-block::
84+
85+
% git checkout release
86+
87+
The ``release`` branch of the repo always points to the most advanced stable
88+
release. Other branches may contain compatible updates to older releases.
89+
90+
The default ``main`` branch may contain experimental features which could change in future
91+
versions. It should only be used for testing, or for developers contributing to
92+
the OpenEXR project.
8193

8294

8395
Prerequisites

0 commit comments

Comments
 (0)