title: Max File Extension Length
body: <p>Is there a maximum lengh for a file extension?  The longest one I've seen is .compiled (8 chars)</p>
  
  <p><strong>Useless Background</strong></p>
  
  <p>I'm creating a IHttpHandler to return image icons for a specific filename.  I'm simply calling a FileImage.axd?ext=pptx.  I'm generating the files on the fly using SHGetFileInfo similar to <a href="http://bendewey.wordpress.com/2008/02/22/nativefiletypeviewer-fileiconimageconverter-convert-a-filename-to-the-file-system-icon/" rel="noreferrer">my post</a> for WPF, then caching them locally in a folder with the filename 'pptx.png'.  I'd like to validate the length and trim it to prevent a DoS type attack where someone would try to generate images for and infinite number of junk characters (eg FileImage.axd?ext=asdfasdfweqrsadfasdfwqe...).</p>