Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Dec 2009 19:23:25 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r200735 - stable/8/lib/libtacplus
Message-ID:  <200912191923.nBJJNPKo041484@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912191923.nBJJNPKo041484>