diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2006-05-22 06:37:06 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2006-05-22 06:37:06 +0000 |
commit | be4cb1df6dfafb343eae7ba12d9610ff38e8b22a (patch) | |
tree | 4672a7a26df2b6581fa17a8f3ff880f81f5584e8 /dev-util/rats | |
parent | version bump for gdal ruby bindings (diff) | |
download | historical-be4cb1df6dfafb343eae7ba12d9610ff38e8b22a.tar.gz historical-be4cb1df6dfafb343eae7ba12d9610ff38e8b22a.tar.bz2 historical-be4cb1df6dfafb343eae7ba12d9610ff38e8b22a.zip |
Add yet another fix against a segfault that ChrisWhite found.
Package-Manager: portage-2.1_rc1-r2
Diffstat (limited to 'dev-util/rats')
-rw-r--r-- | dev-util/rats/ChangeLog | 8 | ||||
-rw-r--r-- | dev-util/rats/Manifest | 19 | ||||
-rw-r--r-- | dev-util/rats/files/digest-rats-2.1-r2 | 3 | ||||
-rw-r--r-- | dev-util/rats/files/rats-2.1-fix-null-pointers.patch | 128 | ||||
-rw-r--r-- | dev-util/rats/rats-2.1-r2.ebuild | 37 |
5 files changed, 190 insertions, 5 deletions
diff --git a/dev-util/rats/ChangeLog b/dev-util/rats/ChangeLog index c6507e7d071e..5a421266edd9 100644 --- a/dev-util/rats/ChangeLog +++ b/dev-util/rats/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-util/rats # Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/rats/ChangeLog,v 1.12 2006/05/22 05:32:38 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/rats/ChangeLog,v 1.13 2006/05/22 06:37:06 robbat2 Exp $ + +*rats-2.1-r2 (22 May 2006) + + 22 May 2006; Robin H. Johnson <robbat2@gentoo.org> + +files/rats-2.1-fix-null-pointers.patch, +rats-2.1-r2.ebuild: + Add yet another fix against a segfault that ChrisWhite found. 22 May 2006; Robin H. Johnson <robbat2@gentoo.org> rats-2.1-r1.ebuild: Forgot to inherit eutils. diff --git a/dev-util/rats/Manifest b/dev-util/rats/Manifest index cf80f81aa443..6a8b6fa6a3c8 100644 --- a/dev-util/rats/Manifest +++ b/dev-util/rats/Manifest @@ -2,19 +2,27 @@ AUX rats-2.1-add-getopt-trailing-null.patch 367 RMD160 828617e1131d5fbc3dbfca6a0 MD5 82bb94ac0852d3570248496af1ae76f7 files/rats-2.1-add-getopt-trailing-null.patch 367 RMD160 828617e1131d5fbc3dbfca6a0bc1fc987395d58d files/rats-2.1-add-getopt-trailing-null.patch 367 SHA256 53ea4b679683af99ddfe1eb997038786caee9e69a3bcbb0f4bc9815a2eb3327d files/rats-2.1-add-getopt-trailing-null.patch 367 +AUX rats-2.1-fix-null-pointers.patch 3600 RMD160 bc04707132523a862d432a684e833569dda5e148 SHA1 ca1252ac0c77ded99e810256887ef0f79dce6d0e SHA256 30753ace2b091bfe802350693279842774d59eb80ccc17a50182b102e01d5a76 size 3600 +MD5 f6e2ca28fe75279b62401c9989b4f5e7 files/rats-2.1-fix-null-pointers.patch 3600 +RMD160 bc04707132523a862d432a684e833569dda5e148 files/rats-2.1-fix-null-pointers.patch 3600 +SHA256 30753ace2b091bfe802350693279842774d59eb80ccc17a50182b102e01d5a76 files/rats-2.1-fix-null-pointers.patch 3600 DIST rats-2.1.tar.gz 326930 RMD160 6385ff617bf629b03eff64f5563963c905341f22 SHA256 ec9fac2765b655c03cede8c5920de3226581f1e626be314bce95f4d0ac9aadd9 size 326930 EBUILD rats-2.1-r1.ebuild 791 RMD160 e369e66f0d8b07bb3acbd1ddfe2e2ed0ea7ae464 SHA1 ea0f3c77e63f65f04866285c8e2865bc6aec44b5 SHA256 02939c7ddb1f2dd5216e2ee96a135be2da4e0359b2a4321d63b489d8f065d41e size 791 MD5 cfb026c85e93a842a8762deda53a89d4 rats-2.1-r1.ebuild 791 RMD160 e369e66f0d8b07bb3acbd1ddfe2e2ed0ea7ae464 rats-2.1-r1.ebuild 791 SHA256 02939c7ddb1f2dd5216e2ee96a135be2da4e0359b2a4321d63b489d8f065d41e rats-2.1-r1.ebuild 791 +EBUILD rats-2.1-r2.ebuild 1073 RMD160 3fc4e3bfceeb49828582b5b1f79551743927c183 SHA1 46618f72820ee1b1f35b665c8c75e8f5f329ac75 SHA256 ecfc64556cdaa11fec2ddd60204d18e5c493179958d196532a1d5429af232688 size 1073 +MD5 f2620629ffedeb4c0dbec25f35461636 rats-2.1-r2.ebuild 1073 +RMD160 3fc4e3bfceeb49828582b5b1f79551743927c183 rats-2.1-r2.ebuild 1073 +SHA256 ecfc64556cdaa11fec2ddd60204d18e5c493179958d196532a1d5429af232688 rats-2.1-r2.ebuild 1073 EBUILD rats-2.1.ebuild 690 RMD160 100164f2729df028556a81b953199d90883f8054 SHA1 354b7171dd714e6f29bfe217a7e036a6b1f0ea58 SHA256 e930b48e66f2d0c6caad26d1b7049011ee356d8bc6a1a6b933fa87652a4e2343 size 690 MD5 0a64e4533250d7d83f6a102bc46635f7 rats-2.1.ebuild 690 RMD160 100164f2729df028556a81b953199d90883f8054 rats-2.1.ebuild 690 SHA256 e930b48e66f2d0c6caad26d1b7049011ee356d8bc6a1a6b933fa87652a4e2343 rats-2.1.ebuild 690 -MISC ChangeLog 1238 RMD160 a9c116ff6de84f5b82577914724632d0a79ceca3 SHA1 f7e599deeaed083376306b86a4c57639c0fb316b SHA256 7a77032cf3c3b56ed4f38be1cffdf06918f06d686db4c82556df3ea0717c331d size 1238 -MD5 9ba931c7b3b94b208914941d6c7f24d8 ChangeLog 1238 -RMD160 a9c116ff6de84f5b82577914724632d0a79ceca3 ChangeLog 1238 -SHA256 7a77032cf3c3b56ed4f38be1cffdf06918f06d686db4c82556df3ea0717c331d ChangeLog 1238 +MISC ChangeLog 1448 RMD160 488abec651d1467d6d77b0d7d297d33c161f7be0 SHA1 abf98dbb55d76bcae7722dbc5981cbbe0364dfd8 SHA256 586267885ffdb2af359e0acdfb193e4e3da8d574d81d2bcdbd0f953788bd8297 size 1448 +MD5 5f3430abb934e526b5aefdfc70829b73 ChangeLog 1448 +RMD160 488abec651d1467d6d77b0d7d297d33c161f7be0 ChangeLog 1448 +SHA256 586267885ffdb2af359e0acdfb193e4e3da8d574d81d2bcdbd0f953788bd8297 ChangeLog 1448 MISC metadata.xml 611 RMD160 51ee5aab1aff5bda5dbeae8bc3f6f28c104831d4 SHA1 41763839b4b9b8d8ce703a9497de4313eb4cbf14 SHA256 70d9c19540099146b4fca813f2577e3c20ea8ea5066682046b06750700400d94 size 611 MD5 2ce0a08044233480d52a129c2d6a9626 metadata.xml 611 RMD160 51ee5aab1aff5bda5dbeae8bc3f6f28c104831d4 metadata.xml 611 @@ -25,3 +33,6 @@ SHA256 0894c5cfdc5c51689bf60e833061e829d4d44f89f84a52ad9cebc2827a663be9 files/di MD5 9f58ff5c9bd41c9c8648b06484505c58 files/digest-rats-2.1-r1 226 RMD160 2c6324fca18d29da4a2c0b0220d9d0a8f572baa9 files/digest-rats-2.1-r1 226 SHA256 0894c5cfdc5c51689bf60e833061e829d4d44f89f84a52ad9cebc2827a663be9 files/digest-rats-2.1-r1 226 +MD5 9f58ff5c9bd41c9c8648b06484505c58 files/digest-rats-2.1-r2 226 +RMD160 2c6324fca18d29da4a2c0b0220d9d0a8f572baa9 files/digest-rats-2.1-r2 226 +SHA256 0894c5cfdc5c51689bf60e833061e829d4d44f89f84a52ad9cebc2827a663be9 files/digest-rats-2.1-r2 226 diff --git a/dev-util/rats/files/digest-rats-2.1-r2 b/dev-util/rats/files/digest-rats-2.1-r2 new file mode 100644 index 000000000000..cf460df77785 --- /dev/null +++ b/dev-util/rats/files/digest-rats-2.1-r2 @@ -0,0 +1,3 @@ +MD5 adf31806f1eff0c353abcfd57653ecb3 rats-2.1.tar.gz 326930 +RMD160 6385ff617bf629b03eff64f5563963c905341f22 rats-2.1.tar.gz 326930 +SHA256 ec9fac2765b655c03cede8c5920de3226581f1e626be314bce95f4d0ac9aadd9 rats-2.1.tar.gz 326930 diff --git a/dev-util/rats/files/rats-2.1-fix-null-pointers.patch b/dev-util/rats/files/rats-2.1-fix-null-pointers.patch new file mode 100644 index 000000000000..0d4c701f0bfc --- /dev/null +++ b/dev-util/rats/files/rats-2.1-fix-null-pointers.patch @@ -0,0 +1,128 @@ +diff -Nuar rats-2.1.orig/report.c rats-2.1/report.c +--- rats-2.1.orig/report.c 2002-09-16 21:05:43.000000000 -0700 ++++ rats-2.1/report.c 2006-05-21 23:16:16.323046789 -0700 +@@ -122,9 +122,15 @@ + return result; + } + +- +- +- ++/* Exclusively for debugging vulnerabilities. ++ * - robbat2@gentoo.org 21/05/2006 */ ++static void debug_vuln_dump(vulnerability_t *ptr) { ++ fprintf(stderr,"vuln_dump: this=%x f=%s l=%d c=%d d=%x t=%d s=%d u=%x p=(%x,%x)\n", ++ ptr, ++ ptr->filename,ptr->lineno,ptr->column, ++ ptr->data,ptr->type,ptr->severity, ++ ptr->uses,ptr->next,ptr->prev); ++} + + static void + replace_cfname(char *filename) +@@ -317,6 +323,27 @@ + insert_vulnerability(log); + } + ++/* These are special static vulnerabilities because we don't ++ * want NULL data elements in the vulnerability_t->data ++ * field, because the HTML and XML output formats use that ++ * pointer without checking it for being null first. ++ * - robbat2@gentoo.org 21/05/2006 */ ++static struct Vuln_t vuln_PerlBacktick = { ++ .Name = "Perl Backtick" ++}; ++static struct Vuln_t vuln_PhpBacktick = { ++ .Name = "PHP Backtick" ++}; ++static struct Vuln_t vuln_PythonBacktick = { ++ .Name = "Python Backtick" ++}; ++static struct Vuln_t vuln_StaticLocalBuffer = { ++ .Name = "Static Local Buffer" ++}; ++static struct Vuln_t vuln_StaticGlobalBuffer = { ++ .Name = "Static Global Buffer" ++}; ++ + void log_perlbacktick(int lineno, int column, Severity_t severity) + { + vulnerability_t * log; +@@ -325,7 +352,7 @@ + log->filename = current_file; + log->column = column; + log->lineno = lineno; +- log->data = (Vuln_t *)NULL; ++ log->data = &vuln_PerlBacktick; + log->type = PerlBacktick; + log->severity = severity; + log->uses = (toctou_use_t *)NULL; +@@ -342,7 +369,7 @@ + log->filename = current_file; + log->column = column; + log->lineno = lineno; +- log->data = (Vuln_t *)NULL; ++ log->data = &vuln_PhpBacktick; + log->type = PhpBacktick; + log->severity = severity; + log->uses = (toctou_use_t *)NULL; +@@ -358,7 +385,7 @@ + log->filename = current_file; + log->column = column; + log->lineno = lineno; +- log->data = (Vuln_t *)NULL; ++ log->data = &vuln_PythonBacktick; + log->type = PythonBacktick; + log->severity = severity; + log->uses = (toctou_use_t *)NULL; +@@ -374,7 +401,16 @@ + log->filename = current_file; + log->column = column; + log->lineno = lineno; +- log->data = (Vuln_t *)NULL; ++ switch(type) { ++ case StaticLocalBuffer: ++ log->data = &vuln_StaticLocalBuffer; ++ break; ++ case StaticGlobalBuffer: ++ log->data = &vuln_StaticGlobalBuffer; ++ break; ++ default: ++ log->data = (Vuln_t *)NULL; ++ } + log->type = type; + log->severity = severity; + log->uses = (toctou_use_t *)NULL; +@@ -432,6 +468,10 @@ + static void build_xml_vulnerability(vulnerability_t *ptr) { + int i; + ++ /* Debugging - robbat2@gentoo.org 21/05/2006 */ ++ if(ptr->data == NULL) ++ debug_vuln_dump(ptr); ++ + printf("<vulnerability>\n"); + + /* Output the severity */ +@@ -593,6 +633,8 @@ + void report_vulnerability(vulnerability_t *ptr) + { + int i; ++ if(ptr->data == NULL) ++ debug_vuln_dump(ptr); + + switch (ptr->type) + { +@@ -890,8 +932,10 @@ + + static void build_html_vulnerability(vulnerability_t *ptr) { + int i; +- +- ++ ++ /* Debugging - robbat2@gentoo.org 21/05/2006 */ ++ if(ptr->data == NULL) ++ debug_vuln_dump(ptr); + + /* Output the severity */ + printf(" <b>Severity: %s</b><br/>\n", diff --git a/dev-util/rats/rats-2.1-r2.ebuild b/dev-util/rats/rats-2.1-r2.ebuild new file mode 100644 index 000000000000..12f81ce7af88 --- /dev/null +++ b/dev-util/rats/rats-2.1-r2.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/rats/rats-2.1-r2.ebuild,v 1.1 2006/05/22 06:37:06 robbat2 Exp $ + +inherit eutils + +DESCRIPTION="RATS - Rough Auditing Tool for Security" +HOMEPAGE="http://www.securesoftware.com/download_rats.htm" +SRC_URI="http://www.securesoftware.com/${PN}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" +DEPEND="dev-libs/expat + virtual/libc" + +src_unpack() { + unpack ${A} + epatch ${FILESDIR}/${P}-add-getopt-trailing-null.patch + epatch ${FILESDIR}/${P}-fix-null-pointers.patch +} + +src_compile() { + econf --datadir="/usr/share/${PN}/" || die + emake || die +} + +src_install () { + einstall SHAREDIR="${D}/usr/share/${PN}" MANDIR="${D}/usr/share/man" || die + dodoc README README.win32 +} + +pkg_postinst() { + ewarn "Please be careful when using this program with it's force language" + ewarn "option, '--language <LANG>' it may take huge amounts of memory when" + ewarn "it tries to treat binary files as some other type." +} |