src/fcint.h (FcCacheBankToIndex);
Fix segfault by guarding array dereference.
This commit is contained in:
parent
b8948e8542
commit
93a27747a4
|
@ -1,3 +1,8 @@
|
|||
2005-11-29 Patrick Lam <plam@mit.edu>
|
||||
* src/fcint.h (FcCacheBankToIndex);
|
||||
|
||||
Fix segfault by guarding array dereference.
|
||||
|
||||
2005-11-29 Dirk Mueller <dmueller@suse.de>
|
||||
reviewed by: plam
|
||||
|
||||
|
|
|
@ -469,7 +469,7 @@ FcCacheBankToIndexMTF (int bank);
|
|||
static __inline__ int
|
||||
FcCacheBankToIndex (int bank)
|
||||
{
|
||||
return _fcBankId[*_fcBankIdx] == bank ? *_fcBankIdx : FcCacheBankToIndexMTF(bank);
|
||||
return (_fcBankId && _fcBankId[*_fcBankIdx] == bank) ? *_fcBankIdx : FcCacheBankToIndexMTF(bank);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
|
Loading…
Reference in New Issue