Skip to content
  • Alan Coopersmith's avatar
    Avoid null pointer dereference in FcNameParse if malloc fails · 0b7f42f7
    Alan Coopersmith authored and Akira TAGOH's avatar Akira TAGOH committed
    
    
    Reported by parfait 1.3:
    Error: Null pointer dereference (CWE 476)
       Read from null pointer t
            at line 423 of src/fcname.c in function 'FcNameParse'.
              Function _FcObjectLookupOtherTypeByName may return constant 'NULL'
               at line 63, called at line 122 of src/fcobjs.c in function
               'FcObjectLookupOtherTypeByName'.
              Function FcObjectLookupOtherTypeByName may return constant 'NULL'
               at line 122, called at line 67 of src/fcname.c in function
               'FcNameGetObjectType'.
              Function FcNameGetObjectType may return constant 'NULL' at line 67,
               called at line 422 in function 'FcNameParse'.
              Null pointer introduced at line 63 of src/fcobjs.c in function
               '_FcObjectLookupOtherTypeByName'.
    
    Signed-off-by: default avatarAlan Coopersmith <alan.coopersmith@oracle.com>
    0b7f42f7