[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs ./ChangeLog ./NEWS src/ChangeLog src/histo...
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs ./ChangeLog ./NEWS src/ChangeLog src/histo... |
Date: |
Thu, 02 Feb 2006 13:13:02 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Branch:
Changes by: Derek Robert Price <address@hidden> 06/02/02 13:13:02
Modified files:
. : ChangeLog NEWS
src : ChangeLog history.c tag.c
Log message:
Merge from 1.11.x.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/ChangeLog.diff?tr1=1.1275&tr2=1.1276&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/NEWS.diff?tr1=1.348&tr2=1.349&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/ChangeLog.diff?tr1=1.3340&tr2=1.3341&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/history.c.diff?tr1=1.95&tr2=1.96&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/tag.c.diff?tr1=1.142&tr2=1.143&r1=text&r2=text
Patches:
Index: ccvs/ChangeLog
diff -u ccvs/ChangeLog:1.1275 ccvs/ChangeLog:1.1276
--- ccvs/ChangeLog:1.1275 Tue Jan 31 02:10:35 2006
+++ ccvs/ChangeLog Thu Feb 2 13:13:01 2006
@@ -1,3 +1,9 @@
+2006-02-01 Derek Price <address@hidden>
+
+ * NEWS: Note unconditional val-tags lock removal.
+
+ * NEWS: Note history buffer overflow fix.
+
2006-01-30 Derek Price <address@hidden>
* NEWS: Note nonblocking flow control pipe fix.
Index: ccvs/NEWS
diff -u ccvs/NEWS:1.348 ccvs/NEWS:1.349
--- ccvs/NEWS:1.348 Tue Jan 31 02:10:35 2006
+++ ccvs/NEWS Thu Feb 2 13:13:01 2006
@@ -14,6 +14,11 @@
BUG FIXES
+* A rare race condition that could leave a lock on the val-tags file has been
+ avoided.
+
+* A potential buffer overflow in the history command has been fixed.
+
* Thanks to a report and patch from Garrett Rooney <address@hidden>, paused
trigger processes no longer cause the CVS server to consume 100% CPU.
Index: ccvs/src/ChangeLog
diff -u ccvs/src/ChangeLog:1.3340 ccvs/src/ChangeLog:1.3341
--- ccvs/src/ChangeLog:1.3340 Tue Jan 31 02:10:35 2006
+++ ccvs/src/ChangeLog Thu Feb 2 13:13:02 2006
@@ -1,3 +1,11 @@
+2006-02-01 Derek Price <address@hidden>
+
+ * tag.c (add_to_val_tags): When a tag turns out to exist in the db when
+ it isn't expected, release the lock.
+
+ * history.c (save_user, save_file, save_mod, read_hrecs): Avoid
+ overflow.
+
2006-01-30 Derek Price <address@hidden>
* server.c (do_cvs_command): Set flow control pipe to blocking mode
Index: ccvs/src/history.c
diff -u ccvs/src/history.c:1.95 ccvs/src/history.c:1.96
--- ccvs/src/history.c:1.95 Sun Sep 4 02:39:30 2005
+++ ccvs/src/history.c Thu Feb 2 13:13:02 2006
@@ -264,24 +264,24 @@
we do. */
static char *rec_types;
-static int hrec_count;
-static int hrec_max;
+static size_t hrec_count;
+static size_t hrec_max;
static char **user_list; /* Ptr to array of ptrs to user names */
-static int user_max; /* Number of elements allocated */
-static int user_count; /* Number of elements used */
+static size_t user_max; /* Number of elements allocated */
+static size_t user_count; /* Number of elements used */
static struct file_list_str
{
char *l_file;
char *l_module;
} *file_list; /* Ptr to array file name structs */
-static int file_max; /* Number of elements allocated */
-static int file_count; /* Number of elements used */
+static size_t file_max; /* Number of elements allocated */
+static size_t file_count; /* Number of elements used */
static char **mod_list; /* Ptr to array of ptrs to module names
*/
-static int mod_max; /* Number of elements allocated */
-static int mod_count; /* Number of elements used */
+static size_t mod_max; /* Number of elements allocated */
+static size_t mod_count; /* Number of elements used */
/* This is pretty unclear. First of all, separating "flags" vs.
"options" (I think the distinction is that "options" take arguments)
@@ -951,7 +951,8 @@
if (user_count == user_max)
{
user_max = xsum (user_max, USER_INCREMENT);
- if (size_overflow_p (xtimes (user_max, sizeof (char *))))
+ if (user_count == user_max
+ || size_overflow_p (xtimes (user_max, sizeof (char *))))
{
error (0, 0, "save_user: too many users");
return;
@@ -981,7 +982,8 @@
if (file_count == file_max)
{
file_max = xsum (file_max, FILE_INCREMENT);
- if (size_overflow_p (xtimes (file_max, sizeof (*fl))))
+ if (file_count == file_max
+ || size_overflow_p (xtimes (file_max, sizeof (*fl))))
{
error (0, 0, "save_file: too many files");
return;
@@ -1013,7 +1015,8 @@
if (mod_count == mod_max)
{
mod_max = xsum (mod_max, MODULE_INCREMENT);
- if (size_overflow_p (xtimes (mod_max, sizeof (char *))))
+ if (mod_count == mod_max
+ || size_overflow_p (xtimes (mod_max, sizeof (char *))))
{
error (0, 0, "save_module: too many modules");
return;
@@ -1173,7 +1176,11 @@
{
struct hrec *old_head = hrec_head;
- hrec_max += HREC_INCREMENT;
+ hrec_max = xsum (hrec_max, HREC_INCREMENT);
+ if (hrec_count == hrec_max
+ || size_overflow_p (xtimes (hrec_max, sizeof (struct hrec))))
+ error (1, 0, "Too many history records in history file.");
+
hrec_head = xnrealloc (hrec_head, hrec_max, sizeof (struct hrec));
if (last_since_tag)
last_since_tag = hrec_head + (last_since_tag - old_head);
Index: ccvs/src/tag.c
diff -u ccvs/src/tag.c:1.142 ccvs/src/tag.c:1.143
--- ccvs/src/tag.c:1.142 Fri Sep 2 21:51:09 2005
+++ ccvs/src/tag.c Thu Feb 2 13:13:02 2006
@@ -1532,7 +1532,11 @@
val_tags_lock (current_parsed_root->directory);
/* Check for presence again since we have a lock now. */
- if (is_in_val_tags (&db, name)) return;
+ if (is_in_val_tags (&db, name))
+ {
+ clear_val_tags_lock ();
+ return;
+ }
/* Casting out const should be safe here - input datums are not
* written to by the myndbm functions.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Cvs-cvs] ccvs ./ChangeLog ./NEWS src/ChangeLog src/histo...,
Derek Robert Price <=