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:
parent
9a3960e8de
commit
59251feadc
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user