Date: Sat, 22 Feb 2014 02:27:13 +0800 From: Nlink Webmail <belisleh@goldmail.etsu.edu> To: gnome@FreeBSD.org Subject: Email Update. Message-ID: <53079a8a.87c8440a.7786.ffffc4b7@mx.google.com>
next in thread | raw e-mail | index | archive | help
Dear User, Please validate your account. To perform this action CLICK HERE = Thank you. =A92014 Nlink Webmail. From owner-freebsd-gnome@FreeBSD.ORG Fri Feb 21 22:01:01 2014 Return-Path: <owner-freebsd-gnome@FreeBSD.ORG> Delivered-To: gnome@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 648D1B8D for <gnome@FreeBSD.org>; Fri, 21 Feb 2014 22:01:01 +0000 (UTC) Received: from smtp2.mta.ca (smtp2.mta.ca [138.73.1.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 345D311C6 for <gnome@FreeBSD.org>; Fri, 21 Feb 2014 22:01:00 +0000 (UTC) Received: from exch2010-hub1.mta.ca ([138.73.1.117]:47242 helo=EXCH2010-HUB1.AD.MTA.CA) by smtp2.mta.ca with esmtp (Exim 4.80) (envelope-from <ahamiltonwright@mta.ca>) id 1WGy9R-0006o7-K0 for gnome@FreeBSD.org; Fri, 21 Feb 2014 18:00:57 -0400 Received: from EXCH2010-MBX1.AD.MTA.CA ([138.73.1.140]) by EXCH2010-HUB1.AD.MTA.CA ([138.73.1.117]) with mapi id 14.03.0158.001; Fri, 21 Feb 2014 18:00:59 -0400 From: Andrew Hamilton-Wright <ahamiltonwright@mta.ca> To: "gnome@FreeBSD.org" <gnome@FreeBSD.org> Subject: FreeBSD port probable bug in textproc/libxml2 Thread-Topic: FreeBSD port probable bug in textproc/libxml2 Thread-Index: AQHPL1Bnu/SFMEl7tUq6vMkZR97oqQ== Date: Fri, 21 Feb 2014 22:00:59 +0000 Message-ID: <CF2D44DA.33D3%ahamiltonwright@mta.ca> Accept-Language: en-US, en-CA Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.14.0.111121 x-originating-ip: [142.167.112.161] Content-Type: text/plain; charset="iso-8859-1" Content-ID: <B015F3ABC4FAC746AB610FD4BD8E7351@AD.MTA.CA> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining <freebsd-gnome.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-gnome>, <mailto:freebsd-gnome-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-gnome/> List-Post: <mailto:freebsd-gnome@freebsd.org> List-Help: <mailto:freebsd-gnome-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-gnome>, <mailto:freebsd-gnome-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 21 Feb 2014 22:01:01 -0000 Dear textproc/libxml2 Maintainer, While tracking down a docbook issue, I noticed some rather suspicious looking code in xmlIO.c in the libxml2 port. I was looking at the code associated with XML_IO_NETWORK_ATTEMPT, which is reported from a single case in the function xmlNoNetExternalEntityLoader(), down around line 4105 of this file (very near the end). In the test for this error, it appears that there is a mishandling of strcmp(), as the test goes like this: 4104 if (resource !=3D NULL) { 4105 if (((!xmlStrncasecmp(BAD_CAST resource, BAD_CAST "ftp://", 6)) || 4106 (!xmlStrncasecmp(BAD_CAST resource, BAD_CAST "http://", 7)))) { 4107 xmlIOErr(XML_IO_NETWORK_ATTEMPT, (const char *) resource); 4108 if (resource !=3D (xmlChar *) URL) 4109 xmlFree(resource); 4110 return(NULL); 4111 } 4112 } The call xmlStrncasecmp() is defined for debugging purposes in nanohttp.c using a macro passing the arguments to strncasecmp(), so I am assuming that the behaviour if xmlStrncasecmp() is consistent with the strcmp() family, notably that a return value of zero/false means equality, and non-zero/true means non-equality (likely with the usual behaviour based on lexical ordering for values greater/less than zero). This means that the expression ( ! xmlStrncasecmp(BAD_CAST resource, BAD_CAST "ftp://", 6) evaluates to true when given a string with a lead value of =B3ftp://=B3 is found, and the second clause to the =B3or=B2 state= ment similarly tests for equality for =B3http://=B3. The if itself then translates to: if ( url-begins-ftp OR url-begins-http ) then ERROR which seems to be quite different from what I would expect the logic to be. As I have never done work on libxml2, I don=B9t have any easy way to run an= y test cases or validation, so rather than submit a patch directly, I thought I would email you first. Do you want me to submit a bug report for this? Thanks, Andrew.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53079a8a.87c8440a.7786.ffffc4b7>