On Fri, Apr 1, 2011 at 3:42 PM, Carsten Haitzler <[email protected]> wrote:
> On Fri, 1 Apr 2011 15:21:42 +0200 Cedric BAIL <[email protected]> said:
>> On Fri, Apr 1, 2011 at 12:56 PM, Carsten Haitzler <[email protected]>
>> wrote:
>> > On Fri, 1 Apr 2011 09:16:39 +0200 [email protected] said:
>> >> I don't get it. Isn't eet supposed to detect corrupt files? I guess it is
>> >> something inside efreet, tried to find it but didn't see anything weird.
>> >
>> > well only as corrupt as eet will fail finding stuff in the header. rememebr
>> > eet files generally are:
>> >
>> > [header]
>> > [key hash/list + data offset per key]
>> > [data1]
>> > [data2]
>> > [data3]
>> > ...
>> >
>> > so it could happily write half of data3 - but then loading data3 key at ALL
>> > will fail. shared string dict also complicates that a bit as string dict is
>> > mmaped.
>>
>> eet does check string correctness (starting and ending position inside
>> the mmaped data and terminated by a \0). It also check that each data
>> are inside the mmaped area. So it would refuse to load a file that is
>> corrupted at all. If not I consider this a bug.
>
> it SHOULD... but DOES it.. we need the bad file to test with...

Just checked the code and it does. Maybe some bugs could be hidden,
but basically every thing seems to be correctly tested.

> maybe we should just create a stress test for eet
> make random files
> ie random data
> then work our way from a big or small eet file and randomly write bytes in it
> until eet "complains" (ie gracefully fails) as long as it doesnt segv
> :)

Fuzzing eet sounds like a good idea anyway that would complete the
test suite quite nicely !
-- 
Cedric BAIL

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to