After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 152844 - http seek to eof yields really silly results
http seek to eof yields really silly results
Status: RESOLVED DUPLICATE of bug 153153
Product: gnome-vfs
Classification: Deprecated
Component: Module: http
cvs (head)
Other All
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2004-09-16 19:19 UTC by Morten Welinder
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Morten Welinder 2004-09-16 19:19:57 UTC
With the little patch below, things fail badly from the seek of that seek
and going forward.

wget http://jk.ufisa.uninett.no/gnumeric/colwidth.xls
./test-seek http://jk.ufisa.uninett.no/gnumeric/colwidth.xls colwidth.xls

** (process:12670): WARNING **: read failure: vfs read 69724 and fread 0 bytes
('Generic error')
** (process:12670): WARNING **: read failure: vfs read 69724 and fread 466 bytes
('Generic error')
** (process:12670): WARNING **: Offset mismatch 719 should be 1185
** (process:12670): WARNING **: Offset mismatch 719 should be 1185
** (process:12670): WARNING **: Offset mismatch 719 should be 1185



--- test-seek.c.~1.4.~	2004-09-16 15:16:08.000000000 -0400
+++ test-seek.c	2004-09-16 15:16:29.000000000 -0400
@@ -217,6 +217,12 @@
 		GnomeVFSFileOffset   seekpos = (1000.0 * rand () / (RAND_MAX + 1.0));
 		GnomeVFSSeekPosition w = (int)(2.0 * rand () / (RAND_MAX + 1.0));
 
+		if (i == 0) {
+			length = 0;
+			seekpos = 0;
+			w = GNOME_VFS_SEEK_END;
+		}
+
 		if (!seek_test_chunk (handle, ref, seekpos, w, length)) {
 			printf ("Failed: seek (offset %d, whence '%s'), read (length %d), tell = %ld\n",
 				(int)seekpos, translate_vfs_seek_pos (w, NULL),
Comment 1 Morten Welinder 2004-09-17 14:56:19 UTC
While this looks like a technicality it actually breaks OLE2 reading in libgsf
and thus xls loading in gnumeric.  Presumably it hits abiword too.
Comment 2 Christian Kellner 2004-09-18 00:09:13 UTC
I'll look at it the the weekend. Thanks!
Comment 3 Christophe Fergeau 2004-09-20 14:53:19 UTC
I think it's a dupe of #153153, please reopen if I'm mistaken.

*** This bug has been marked as a duplicate of 153153 ***