[babl] babl-fish: fix concurrent babl_fish()/process() calls with palette formats



commit 4701c2dcb18e264b93536438798a6063832c0838
Author: Ell <ell_se yahoo com>
Date:   Thu Jun 14 01:54:52 2018 -0400

    babl-fish: fix concurrent babl_fish()/process() calls with palette formats
    
    In babl_fish(), don't call _babl_fish_rig_dispatch() on existing
    path fishes during each lookup.  We already call this function on
    all path fishes upon creation (in particular, after commit
    b34a9672c8c9a42923a8f0b2650af30b1efe635c), so this isn't necessary.
    
    This fixes an issue where the _babl_fish_rig_dispatch() call in
    babl_fish() would temporarily modify the value of babl->fish.data,
    causing a concurrent babl_process[_rows]() call in another thread
    to pass the wrong 'data' value down to the conversion function.  In
    particular, this could cause palette conversions to segfault.

 babl/babl-fish.c | 1 -
 1 file changed, 1 deletion(-)
---
diff --git a/babl/babl-fish.c b/babl/babl-fish.c
index 8c73a2b..749b075 100644
--- a/babl/babl-fish.c
+++ b/babl/babl-fish.c
@@ -257,7 +257,6 @@ babl_fish (const void *source,
         if (ffish.fish_path)
           {
             /* we have found suitable fish path in the database */
-            _babl_fish_rig_dispatch (ffish.fish_path);
             return ffish.fish_path;
           }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]