fontconfig: Branch 'main' - 2 commits

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

 



 src/fcdir.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a062ecb3c409e9b8346df66f0fe8cfce1db6557d
Merge: e6eb25e 9164a7b
Author: Akira TAGOH <akira@xxxxxxxxx>
Date:   Tue Nov 5 03:18:49 2024 +0000

    Merge branch 'fix-qsort-nullpointer' into 'main'
    
    Fix unefined behavior issue in qsort call
    
    See merge request fontconfig/fontconfig!338

commit 9164a7bcbd3be022f074bb0530dd5c12e3c83b44
Author: Andrey Prokopyuk <andrey.prokopyuk@xxxxxxxxx>
Date:   Fri Nov 1 13:50:59 2024 +0300

    Fix qsort nullpointer issue

diff --git a/src/fcdir.c b/src/fcdir.c
index 2e4fdc6..cb2ff42 100644
--- a/src/fcdir.c
+++ b/src/fcdir.c
@@ -265,7 +265,8 @@ FcDirScanConfig (FcFontSet	*set,
     /*
      * Sort files to make things prettier
      */
-    qsort(files->strs, files->num, sizeof(FcChar8 *), cmpstringp);
+    if (files->num)
+        qsort(files->strs, files->num, sizeof(FcChar8 *), cmpstringp);
 
     /*
      * Scan file files to build font patterns



[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux