C# Image.FromStream is that secure?
<p>after reading the data from the request as Stream i needed to convert it to Image so i used this Method:</p>

<pre><code>Stream inputStream = HttpContext.Current.Request.InputStream;
Image img = Image.FromStream(inputStream)
</code></pre>

<p>my question is, while im unable to know what was in that inputStream (file format is done already but still..) there may be a virus or malware, so in that case FromStream(Stream) would throw ArgumentException. since it's not an image.</p>

<p>my question is - If the file uploaded contains a virus, and the method throws an exception while trying to convert the stream to Image, did that make any harm to the server?
if so, how to avoid it? what should be the scenario for handling file upload in the server?</p>
