diff options
author | Marti Maria <info@littlecms.com> | 2010-10-21 12:50:46 +0200 |
---|---|---|
committer | Marti Maria <info@littlecms.com> | 2010-10-21 12:50:46 +0200 |
commit | 4bd08b41fa98610816e73999297ed1648fe8b999 (patch) | |
tree | 9e77cf3bcc025ce54d2bff74b2a84060e8c5b570 /src/cmsnamed.c | |
parent | 80966a65a38ea9cb140b7fdba6bb3d32af0195db (diff) | |
download | lcms2-4bd08b41fa98610816e73999297ed1648fe8b999.tar.gz |
2.1 code review changes
Diffstat (limited to 'src/cmsnamed.c')
-rw-r--r-- | src/cmsnamed.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmsnamed.c b/src/cmsnamed.c index bb12167..e42421d 100644 --- a/src/cmsnamed.c +++ b/src/cmsnamed.c @@ -462,6 +462,9 @@ cmsBool GrowNamedColorList(cmsNAMEDCOLORLIST* v) else size = v ->Allocated * 2; + // Keep a maximum color lists can grow, 100K entries seems reasonable + if (size > 1024*100) return FALSE; + NewPtr = (_cmsNAMEDCOLOR*) _cmsRealloc(v ->ContextID, v ->List, size * sizeof(_cmsNAMEDCOLOR)); if (NewPtr == NULL) return FALSE; |