More realistic file size restriction. UINT32_MAX is not defined on some

target platforms, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28573 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2008-11-09 11:08:19 +00:00
parent 9a3960e8de
commit 59251feadc

View File

@ -221,7 +221,7 @@ StyledTextImporter::Import(Icon* icon, const entry_ref* ref)
err = file.GetSize(&size);
if (err < B_OK)
return err;
if (size > UINT32_MAX - 1)
if (size > 1 * 1024 * 1024) // Don't load files that big
return E2BIG;
BMallocIO mio;