From owner-svn-src-all@FreeBSD.ORG Sat Dec 19 19:23:25 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B27A51065696; Sat, 19 Dec 2009 19:23:25 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A13AA8FC0A; Sat, 19 Dec 2009 19:23:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBJJNPL0041486; Sat, 19 Dec 2009 19:23:25 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBJJNPKo041484; Sat, 19 Dec 2009 19:23:25 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200912191923.nBJJNPKo041484@svn.freebsd.org> From: Attilio Rao Date: Sat, 19 Dec 2009 19:23:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200735 - stable/8/lib/libtacplus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Dec 2009 19:23:25 -0000 Author: attilio Date: Sat Dec 19 19:23:25 2009 New Revision: 200735 URL: http://svn.freebsd.org/changeset/base/200735 Log: MFC r199802: Fix handling of empty attributes. Sponsored by: Sandvine Incorporated Modified: stable/8/lib/libtacplus/taclib.c Directory Properties: stable/8/lib/libtacplus/ (props changed) Modified: stable/8/lib/libtacplus/taclib.c ============================================================================== --- stable/8/lib/libtacplus/taclib.c Sat Dec 19 19:22:09 2009 (r200734) +++ stable/8/lib/libtacplus/taclib.c Sat Dec 19 19:23:25 2009 (r200735) @@ -1263,8 +1263,13 @@ tac_get_av_value(struct tac_handle *h, c * h->srvr_avs[0] = "foobie=var1" * h->srvr_avs[1] = "foo=var2" * is handled. + * + * Note that for empty string attribute values a + * 0-length string is returned in order to distinguish + * against unset values. + * dump_str() will handle srvr.len == 0 correctly. */ - if (found_seperator == 1 && ch != end) { + if (found_seperator == 1) { srvr.len = end - ch; srvr.data = ch; return dup_str(h, &srvr, NULL);