One of the rules of secure programming is that any program that is used in an even remotely security-sensitive context, and anything displaying a Portable <i>Network</i> Graphic is likely to be used in such a context, must be able to specify resource usage limits. In this case that could be dimensions or a limit on the total RAM allowed to be used. Limits need not be hard, either, but could produce a query, for instance, the way very long-running scripts in the browser ask you if they should continue.<p>Now, go find an API&#x2F;library for dealing with PNGs that allow you to pass in such a limit, let alone pass in a callback for dealing with violations. Go ahead. I&#x27;ll wait.<p>(The Internet being what it is, if there is one, someone will pop up in a reply in five minutes citing it. If so, my compliments to the authors! But I think we can all agree that in general image APIs do not offer this control. In fact, in general, if you submit a patch to allow it, it would probably be rejected from most projects as unnecessarily complicating the API.)<p>This is the sort of thing that I mean when I say that we are so utterly buried by insecure coding practices that we can&#x27;t hardly even perceive it around us. I should add this as another example in <a href="http:&#x2F;&#x2F;www.jerf.org&#x2F;iri&#x2F;post&#x2F;2942" rel="nofollow">http:&#x2F;&#x2F;www.jerf.org&#x2F;iri&#x2F;post&#x2F;2942</a> .