]> granicus.if.org Git - php/commitdiff
actually reset stream position when finished
authorAntony Dovgal <tony2001@php.net>
Sat, 13 Sep 2008 21:32:15 +0000 (21:32 +0000)
committerAntony Dovgal <tony2001@php.net>
Sat, 13 Sep 2008 21:32:15 +0000 (21:32 +0000)
ext/fileinfo/fileinfo.c

index 5c421e33306fa5bc1c47e20657dfd55996d173af..9695bad6726ba98e2f3334b4e60609094fed6d8c 100644 (file)
@@ -499,6 +499,8 @@ static void _php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode, int mime
                                php_stream_seek(stream, 0, SEEK_SET);
 
                                ret_val = (char *) magic_stream(magic, stream);
+
+                               php_stream_seek(stream, streampos, SEEK_SET);
                                break;
                }