Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 May 2016 05:33:27 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300264 - head/lib/libstand
Message-ID:  <201605200533.u4K5XRsf064869@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Fri May 20 05:33:26 2016
New Revision: 300264
URL: https://svnweb.freebsd.org/changeset/base/300264

Log:
  Fix a bug in the parsing code: always use the len and not 8.

Modified:
  head/lib/libstand/uuid_from_string.c

Modified: head/lib/libstand/uuid_from_string.c
==============================================================================
--- head/lib/libstand/uuid_from_string.c	Fri May 20 05:00:05 2016	(r300263)
+++ head/lib/libstand/uuid_from_string.c	Fri May 20 05:33:26 2016	(r300264)
@@ -57,7 +57,7 @@ fromhex(const char *s, int len, int *ok)
 	if (!*ok)
 		return 0;
 	v = 0;
-	for (i = 0; i < 8; i++) {
+	for (i = 0; i < len; i++) {
 		h = hex2int(s[i]);
 		if (h == 16) {
 			*ok = 0;



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