OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 30-Oct-2006 20:18:22
Branch: HEAD Handle: 2006103019182100
Modified files:
openpkg-src/cvstrac cvstrac.patch
Log:
fix segfaults under 64-bit platforms like FreeBSD/amd64, because
passing 0 instead of NULL means passing a (small) integer value 0
instead of the (larger) pointer value 0 via var-args and this way the
function partly takes garbage from the stack when checking for the
terminating NULL pointer
Summary:
Revision Changes Path
1.21 +86 -16 openpkg-src/cvstrac/cvstrac.patch
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/cvstrac/cvstrac.patch
============================================================================
$ cvs diff -u -r1.20 -r1.21 cvstrac.patch
--- openpkg-src/cvstrac/cvstrac.patch 30 Oct 2006 18:38:42 -0000 1.20
+++ openpkg-src/cvstrac/cvstrac.patch 30 Oct 2006 19:18:21 -0000 1.21
@@ -1,6 +1,6 @@
Index: attach.c
--- attach.c.orig 2006-05-26 16:20:28 +0200
-+++ attach.c 2006-10-30 19:37:02 +0100
++++ attach.c 2006-10-30 20:14:51 +0100
@@ -210,17 +210,20 @@
}
@@ -35,7 +35,7 @@
if( !got ){
Index: browse.c
--- browse.c.orig 2006-05-26 16:20:28 +0200
-+++ browse.c 2006-10-30 19:37:02 +0100
++++ browse.c 2006-10-30 20:14:51 +0100
@@ -503,6 +503,13 @@
){
int set = (zFld==zField[0]);
@@ -180,7 +180,7 @@
}
Index: cgi.c
--- cgi.c.orig 2006-05-26 16:20:28 +0200
-+++ cgi.c 2006-10-30 19:37:02 +0100
++++ cgi.c 2006-10-30 20:14:51 +0100
@@ -187,7 +187,7 @@
char zETag[64];
@@ -219,7 +219,7 @@
if( zData==0 ) return 0;
Index: common.c
--- common.c.orig 2006-05-26 16:20:28 +0200
-+++ common.c 2006-10-30 19:37:02 +0100
++++ common.c 2006-10-30 20:14:51 +0100
@@ -394,7 +394,10 @@
}
@ </small>
@@ -234,7 +234,7 @@
}
Index: config.h
--- config.h.orig 2006-05-26 16:20:28 +0200
-+++ config.h 2006-10-30 19:37:02 +0100
++++ config.h 2006-10-30 20:14:51 +0100
@@ -9,6 +9,9 @@
#include <stdarg.h>
#include <sqlite3.h>
@@ -247,7 +247,7 @@
** Standard colors. These colors can also be changed using a stylesheet.
Index: cvs.c
--- cvs.c.orig 2006-05-26 16:20:28 +0200
-+++ cvs.c 2006-10-30 19:37:02 +0100
++++ cvs.c 2006-10-30 20:14:51 +0100
@@ -234,6 +234,7 @@
char **azFileList;
FILE *in;
@@ -268,7 +268,7 @@
Index: db.c
--- db.c.orig 2006-05-26 16:20:28 +0200
-+++ db.c 2006-10-30 19:37:02 +0100
++++ db.c 2006-10-30 20:14:51 +0100
@@ -107,6 +107,10 @@
extern int sqlite3StrICmp(const char*, const char*);
if( type==SQLITE_SELECT ){
@@ -324,7 +324,7 @@
db_err( strerror(errno), 0,
Index: format.c
--- format.c.orig 2006-05-26 16:20:28 +0200
-+++ format.c 2006-10-30 19:37:02 +0100
++++ format.c 2006-10-30 20:14:51 +0100
@@ -760,7 +760,7 @@
if( az && az[0] && az[1] ){
cgi_printf("<a href=\"%z\" title=\"%h\">",zLink,az[0]);
@@ -336,7 +336,7 @@
cgi_printf("<strike>#%d</strike>",tn);
Index: login.c
--- login.c.orig 2006-05-26 16:20:28 +0200
-+++ login.c 2006-10-30 19:37:02 +0100
++++ login.c 2006-10-30 20:14:51 +0100
@@ -55,8 +55,8 @@
zGoto = P("g");
if( P("out")!=0 ){
@@ -369,7 +369,7 @@
zAgent = getenv("HTTP_USER_AGENT");
Index: makeheaders.c
--- makeheaders.c.orig 2006-05-26 16:20:28 +0200
-+++ makeheaders.c 2006-10-30 19:37:02 +0100
++++ makeheaders.c 2006-10-30 20:14:51 +0100
@@ -11,9 +11,8 @@
#include <assert.h>
#ifndef WIN32
@@ -433,7 +433,7 @@
);
Index: search.c
--- search.c.orig 2006-05-26 16:20:28 +0200
-+++ search.c 2006-10-30 19:37:02 +0100
++++ search.c 2006-10-30 20:14:51 +0100
@@ -88,7 +88,7 @@
const char *zPattern;
@@ -463,7 +463,16 @@
/*
Index: setup.c
--- setup.c.orig 2006-05-26 16:20:28 +0200
-+++ setup.c 2006-10-30 19:37:02 +0100
++++ setup.c 2006-10-30 20:15:28 +0100
+@@ -334,7 +334,7 @@
+ @ passwords of all CVSTrac users. Enable or disable this feature
+ @ below.</p>
+ @ <p>Write User Changes to CVSROOT/passwd?
+- cgi_optionmenu(0, "wpw", zOldWPswd, "Yes", "yes", "No", "no", 0);
++ cgi_optionmenu(0, "wpw", zOldWPswd, "Yes", "yes", "No", "no", NULL);
+ @ <input type="submit" value="Submit">
+ @ </p>
+ }
@@ -499,7 +499,7 @@
@ <form action="%s(g.zPath)" method="POST">
@ Select a user to whom new tickets will be assigned by default:</p><p>
@@ -473,9 +482,26 @@
cgi_v_optionmenu(0, "asgnto", zOldAsgnto, (const char**)azResult);
@ </p>
@
+@@ -521,14 +521,14 @@
+ @ Select the default priority for new tickets:</p><p>
+ @ Default Priority:
+ cgi_optionmenu(0, "pri", zOldPri, "1", "1", "2", "2", "3", "3", "4", "4",
+- "5", "5", (char*)0);
++ "5", "5", NULL);
+ @ </p>
+ @
+ @ <p>
+ @ Select the default severity for new tickets:</p><p>
+ @ Default Severity:
+ cgi_optionmenu(0, "sev", zOldSev, "1", "1", "2", "2", "3", "3", "4", "4",
+- "5", "5", (char*)0);
++ "5", "5", NULL);
+ @ </p>
+ @
+ @ <p>
Index: throttle.c
--- throttle.c.orig 2006-05-26 16:20:28 +0200
-+++ throttle.c 2006-10-30 19:37:02 +0100
++++ throttle.c 2006-10-30 20:14:51 +0100
@@ -165,7 +165,7 @@
}
@@ -487,7 +513,25 @@
lockout();
Index: ticket.c
--- ticket.c.orig 2006-05-26 16:20:28 +0200
-+++ ticket.c 2006-10-30 19:37:02 +0100
++++ ticket.c 2006-10-30 20:14:51 +0100
+@@ -358,7 +358,7 @@
+ @ <td align="right"><nobr>
+ @ Severity:
+ cgi_optionmenu(0, "r", zSev,
+- "1", "1", "2", "2", "3", "3", "4", "4", "5", "5", 0);
++ "1", "1", "2", "2", "3", "3", "4", "4", "5", "5", NULL);
+ @ </nobr></td>
+ @ <td>
+ @ How debilitating is the problem? "1" is a show-stopper defect with
+@@ -372,7 +372,7 @@
+ @ <td align="right"><nobr>
+ @ Priority:
+ cgi_optionmenu(0, "p", zPri,
+- "1", "1", "2", "2", "3", "3", "4", "4", "5", "5", 0);
++ "1", "1", "2", "2", "3", "3", "4", "4", "5", "5", NULL);
+ @ </nobr></td>
+ @ <td>
+ @ How quickly do you need this ticket to be resolved?
@@ -388,7 +388,7 @@
@ <tr>
@ <td align="right"><nobr>
@@ -506,7 +550,15 @@
az = db_query("SELECT '', '' UNION ALL "
"SELECT name, value FROM enums WHERE type='subsys'");
if( az[0] && az[1] && az[2] ){
-@@ -1323,7 +1325,7 @@
+@@ -1316,14 +1318,14 @@
+ @ <nobr>
+ @ Severity:
+ cgi_optionmenu(0, "e", aParm[5].zNew,
+- "1", "1", "2", "2", "3", "3", "4", "4", "5", "5", 0);
++ "1", "1", "2", "2", "3", "3", "4", "4", "5", "5", NULL);
+ @ </nobr>
+ @
+ @
@ <nobr>
@ Assigned To:
azUsers = (const char**)db_query(
@@ -515,6 +567,15 @@
cgi_v_optionmenu(0, "a", aParm[4].zNew, azUsers);
@ </nobr>
@
+@@ -1349,7 +1351,7 @@
+ @ <nobr>
+ @ Priority:
+ cgi_optionmenu(0, "p", aParm[6].zNew,
+- "1", "1", "2", "2", "3", "3", "4", "4", "5", "5", 0);
++ "1", "1", "2", "2", "3", "3", "4", "4", "5", "5", NULL);
+ @ </nobr>
+ @
+ @
@@ -1442,16 +1444,18 @@
int doSubmit;
const char *zText;
@@ -537,7 +598,7 @@
doSubmit = P("submit")!=0;
Index: timeline.c
--- timeline.c.orig 2006-05-26 16:20:28 +0200
-+++ timeline.c 2006-10-30 19:37:02 +0100
++++ timeline.c 2006-10-30 20:14:51 +0100
@@ -1105,6 +1105,9 @@
z = db_short_query("SELECT date FROM chng WHERE cn=%d",cn);
if( z ) cgi_modified_since(atoi(z));
@@ -548,3 +609,12 @@
/* patchsets are raw output based one what are supposed to be unchanging
file
** revisions.
*/
+@@ -1383,7 +1386,7 @@
+ @ <td><input type="text" name="t" value="%s(zDate)" size=26></td>
+ @ <td width=20> </td>
+ @ <td>Type:
+- cgi_optionmenu(2,"y", zMType, "Release", "1", "Event", "2", 0);
++ cgi_optionmenu(2,"y", zMType, "Release", "1", "Event", "2", NULL);
+ @ </td></tr>
+ @ </td></tr>
+ @ <tr><td align="right">Branch:</td><td>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]