svn commit: r200735 - stable/8/lib/libtacplus

Attilio Rao attilio at FreeBSD.org
Sat Dec 19 19:23:25 UTC 2009


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);


More information about the svn-src-all mailing list