Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: (xml_check_first_element):
Limit search for the first markup tag to the first few kB of
the file. If we don't find one there, it's highly unlikely that
this is an XML(-ish) file.
+2006-07-22 Tim-Philipp Müller <tim at centricular dot net>
+
+ * gst/typefind/gsttypefindfunctions.c: (xml_check_first_element):
+ Limit search for the first markup tag to the first few kB of
+ the file. If we don't find one there, it's highly unlikely that
+ this is an XML(-ish) file.
+
2006-07-21 Andy Wingo <wingo@pobox.com>
* tests/check/pipelines/theoraenc.c (test_discontinuity): Similar
data += 5;
}
- /* look for the first element, it has to be the requested element */
- while (data) {
- while (*data != '<') {
+ /* look for the first element, it has to be the requested element. Bail
+ * out if it is not within the first 4kB. */
+ while (data && (offset + pos) < 4096) {
+ while (*data != '<' && (offset + pos) < 4096) {
XML_INC_BUFFER;
}