diff options
author | L. E. Segovia <amy@centricular.com> | 2024-04-15 16:49:35 -0300 |
---|---|---|
committer | L. E. Segovia <amy@centricular.com> | 2024-08-07 21:02:24 +0000 |
commit | 82fad254528a2f85662184cd001622b3e326cf6b (patch) | |
tree | 4db2018dfd8be1179bff2d962a54962bde82716b | |
parent | ff6a3b9f53e643c9de74a8ad53b228c3c8120d6b (diff) |
orccodemem: Fix attempt to allocate a region of size 0
Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/189>
-rw-r--r-- | orc/orccodemem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/orc/orccodemem.c b/orc/orccodemem.c index ec433fe..dc8e0ab 100644 --- a/orc/orccodemem.c +++ b/orc/orccodemem.c @@ -187,7 +187,7 @@ orc_code_allocate_codemem (OrcCode *code, int size) OrcCodeRegion *region; OrcCodeChunk *chunk; int aligned_size = - (size + _orc_codemem_alignment) & (~_orc_codemem_alignment); + (MAX(1, size) + _orc_codemem_alignment) & (~_orc_codemem_alignment); orc_global_mutex_lock (); chunk = orc_code_region_get_free_chunk (aligned_size); |