Is there a configurable limit on IMFS size?
Phil Torre
ptorre at zetron.com
Fri May 9 00:45:36 UTC 2003
I have an application where I allow the user of an embedded device
to upload configuration files via FTP. The config files are caught
by an FTP file receive hook rather than being written to the IMFS,
and I see where to limit the buffer size for this. That got me
thinking that a user could quite easily click on the wrong file to
upload, bypassing my ftp hook and hitting the filesystem. That wrong
file is potentially sized just smaller than my available heap, so the
write will succeed but my device is now out of heap. :(
Wondering through the source code, I don't see a way to configure
the IMFS for an upper limit on memory usage. It updates the
memfile_blocks_allocated variable, but never tests against it when
it needs to allocate more. If there isn't an existing mechanism that I'm
overlooking, I'm thinking of adding a test to memfile_alloc_block()
against a hard limit configured in the application.
Comments?
--
=====================================================================
Phil Torre phone: 425-820-6363 x234
Design Engineer email: ptorre at zetron.com
Switching Systems Group fax: 425-820-7031
Zetron, Inc. web: http://www.zetron.com
More information about the users
mailing list