Better HN
topnewbestaskshowjobs
Log inSign up

ecma_horse

1 karma · joined May 14, 2017 (9y ago) · 3 submissions

Submissions

comment 9y ago · link · parent

The problem here is that the file is being scanned without the user even attempting to run it. A similar vector would be file previews (thumbnails) or indexing.

If the user is about to execute a malicious file anyway, then scanning it before only adds protection.

comment 9y ago · link · parent

You don't. Assume you don't get it. Right now, chances are you don't get it anyway.

comment 9y ago · link · parent

You absolutely should have knowledge of your target platform and whether it does TCO (and whether it kicks in for your code).

Otherwise, you may decide to just use recursion everywhere and then your stack overflows when your N is bigger than expected.

When in doubt, don't use recursion and don't expect that you get TCO.