Ticket #1767: arch1.2-1.2_1.patch

File arch1.2-1.2_1.patch, 4.5 KB (added by stoerte@…, 20 years ago)

the patch for the format string vulns, pulled from neon´s CVS.

  • Portfile

    diff -ruN arch.orig/Portfile arch/Portfile
    old new  
    33PortSystem 1.0
    44name             arch
    55version          1.2
     6revision         1
    67distname         tla-${version}
    78categories       devel
    89maintainers      toby@opendarwin.org
     
    2021
    2122master_sites     gnu:gnu-arch
    2223checksums        md5 1fbc9cd83c37ad6e88e9e6a5f0b62871
     24patchfiles       patch-libneon-ne_207.c patch-libneon-ne_props.c \
     25                 patch-libneon-ne_auth.c patch-libneon-ne_xml.c \
     26                 patch-libneon-ne_locks.c
     27
    2328
    2429worksrcdir       ${distname}/src/=build
    2530
    26 pre-configure {
     31pre-patch {
    2732    file mkdir ${worksrcpath}
    2833}
    2934configure.cmd    ../configure
  • files/patch-libneon-ne_207.c

    diff -ruN arch.orig/files/patch-libneon-ne_207.c arch/files/patch-libneon-ne_207.c
    old new  
     1--- ../tla/libneon.orig/ne_207.c        Sat Dec  6 20:35:28 2003
     2+++ ../tla/libneon/ne_207.c     Sat Apr 17 20:25:46 2004
     3@@ -320,12 +320,12 @@
     4        if (ne_get_status(req)->code == 207) {
     5            if (!ne_xml_valid(p)) {
     6                /* The parse was invalid */
     7-               ne_set_error(sess, ne_xml_get_error(p));
     8-               ret = NE_ERROR;
     9+               ne_set_error(sess, "%s", ne_xml_get_error(p));
     10+                       ret = NE_ERROR;
     11            } else if (ctx.is_error) {
     12                /* If we've actually got any error information
     13                 * from the 207, then set that as the error */
     14-               ne_set_error(sess, ctx.buf->data);
     15+                ne_set_error(sess, "%s", ctx.buf->data);
     16                ret = NE_ERROR;
     17            }
     18        } else if (ne_get_status(req)->klass != 2) {
  • files/patch-libneon-ne_auth.c

    diff -ruN arch.orig/files/patch-libneon-ne_auth.c arch/files/patch-libneon-ne_auth.c
    old new  
     1--- ../tla/libneon.orig/ne_auth.c       Sat Dec  6 20:35:28 2003
     2+++ ../tla/libneon/ne_auth.c    Sat Apr 17 20:11:55 2004
     3@@ -950,7 +950,7 @@
     4     if (areq->auth_info_hdr != NULL &&
     5        verify_response(areq, sess, areq->auth_info_hdr)) {
     6        NE_DEBUG(NE_DBG_HTTPAUTH, "Response authentication invalid.\n");
     7-       ne_set_error(sess->sess, _(sess->spec->fail_msg));
     8+       ne_set_error(sess->sess, "%s", _(sess->spec->fail_msg));
     9        ret = NE_ERROR;
     10     } else if (status->code == sess->spec->status_code &&
     11               areq->auth_hdr != NULL) {
  • files/patch-libneon-ne_locks.c

    diff -ruN arch.orig/files/patch-libneon-ne_locks.c arch/files/patch-libneon-ne_locks.c
    old new  
     1--- ../tla/libneon.orig/ne_locks.c      Sat Dec  6 20:35:28 2003
     2+++ ../tla/libneon/ne_locks.c   Sat Apr 17 20:11:55 2004
     3@@ -734,7 +734,7 @@
     4        }
     5        else if (parse_failed) {
     6            ret = NE_ERROR;
     7-           ne_set_error(sess, ne_xml_get_error(parser));
     8+           ne_set_error(sess, "%s", ne_xml_get_error(parser));
     9        }
     10        else if (ne_get_status(req)->code == 207) {
     11            ret = NE_ERROR;
     12@@ -802,7 +802,7 @@
     13     if (ret == NE_OK && ne_get_status(req)->klass == 2) {
     14        if (parse_failed) {
     15            ret = NE_ERROR;
     16-           ne_set_error(sess, ne_xml_get_error(parser));
     17+           ne_set_error(sess, "%s", ne_xml_get_error(parser));
     18        }
     19        else if (ne_get_status(req)->code == 207) {
     20            ret = NE_ERROR;
  • files/patch-libneon-ne_props.c

    diff -ruN arch.orig/files/patch-libneon-ne_props.c arch/files/patch-libneon-ne_props.c
    old new  
     1--- ../tla/libneon.orig/ne_props.c      Sat Dec  6 20:35:28 2003
     2+++ ../tla/libneon/ne_props.c   Sat Apr 17 20:11:55 2004
     3@@ -142,7 +142,7 @@
     4     if (ret == NE_OK && ne_get_status(req)->klass != 2) {
     5        ret = NE_ERROR;
     6     } else if (!ne_xml_valid(handler->parser)) {
     7-       ne_set_error(handler->sess, ne_xml_get_error(handler->parser));
     8+       ne_set_error(handler->sess, "%s", ne_xml_get_error(handler->parser));
     9        ret = NE_ERROR;
     10     }
     11 
  • files/patch-libneon-ne_xml.c

    diff -ruN arch.orig/files/patch-libneon-ne_xml.c arch/files/patch-libneon-ne_xml.c
    old new  
     1--- ../tla/libneon.orig/ne_xml.c        Sat Dec  6 20:35:29 2003
     2+++ ../tla/libneon/ne_xml.c     Sat Apr 17 20:11:55 2004
     3@@ -538,7 +538,7 @@
     4 
     5 void ne_xml_set_error(ne_xml_parser *p, const char *msg)
     6 {
     7-    ne_snprintf(p->error, ERR_SIZE, msg);
     8+    ne_snprintf(p->error, ERR_SIZE, "%s", msg);
     9 }
     10 
     11 #ifdef HAVE_LIBXML