about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2023-01-07 16:54:56 +0000
committerThomas E. Dickey <dickey@invisible-island.net>2023-01-07 17:00:30 +0000
commit1bfe2404c96164d626d716419c7077d569470c83 (patch)
tree80c9dd63c9aa596b90632a204f9e8936adb0d791
parente6acd7895fb6793540ce73b2f1f0d81b84179483 (diff)
downloadlynx-snapshots-1bfe2404c96164d626d716419c7077d569470c83.tar.gz
snapshot of project "lynx", label v2-9-0dev_11c
-rw-r--r--CHANGES7
-rw-r--r--src/LYBookmark.c3
2 files changed, 7 insertions, 3 deletions
diff --git a/CHANGES b/CHANGES
index 3fcb9612..1572ce00 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,9 +1,12 @@
--- $LynxId: CHANGES,v 1.1126 2023/01/06 00:33:43 tom Exp $
+-- $LynxId: CHANGES,v 1.1127 2023/01/07 16:54:56 tom Exp $
 ===============================================================================
 Changes since Lynx 2.8 release
 ===============================================================================
 
-2023-01-05 (2.9.0dev.12)
+2023-01-07 (2.9.0dev.12)
+* add a rewind() call before reading existing bookmark file opened for append
+  with read/write, to ensure that the file-position is at the beginning of the
+  file (report by Klatt Volkmar) -TD
 * improve compiler-warnings in configure script checks -TD
 * fix a few ifdef'ing problems (prompted by discussion with Klatt Volkmar) -TD
 * fix spelling errors found with codespell (report by Jens Schleusener) -TD
diff --git a/src/LYBookmark.c b/src/LYBookmark.c
index 8cbd1a70..ee88cf95 100644
--- a/src/LYBookmark.c
+++ b/src/LYBookmark.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: LYBookmark.c,v 1.87 2022/12/04 20:41:31 tom Exp $
+ * $LynxId: LYBookmark.c,v 1.88 2023/01/07 16:09:53 tom Exp $
  */
 #include <HTUtils.h>
 #include <HTAlert.h>
@@ -371,6 +371,7 @@ void save_bookmark_link(const char *address,
 	FILE *bp = tmpfile();
 	char *buffer = NULL;
 
+	rewind(fp);
 	while (LYSafeGets(&buffer, fp)) {
 	    empty_file = FALSE;
 	    if (LYstrstr(buffer, "</ol>"))