Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Feb 2017 06:49:32 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r314191 - head/lib/libcam
Message-ID:  <201702240649.v1O6nWMh002922@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Fri Feb 24 06:49:31 2017
New Revision: 314191
URL: https://svnweb.freebsd.org/changeset/base/314191

Log:
  Fix up r314189
  
  The conditional in do_buff_decode(..) after the while loop was accidentally
  inverted. Only increment the pointer for fmt if it's not NUL.
  
  MFC after:	2 weeks
  X-MFC with:	r314189
  Reported by:	pstef
  Sponsored by:	Dell EMC Isilon

Modified:
  head/lib/libcam/scsi_cmdparse.c

Modified: head/lib/libcam/scsi_cmdparse.c
==============================================================================
--- head/lib/libcam/scsi_cmdparse.c	Fri Feb 24 06:28:58 2017	(r314190)
+++ head/lib/libcam/scsi_cmdparse.c	Fri Feb 24 06:49:31 2017	(r314191)
@@ -169,7 +169,7 @@ do_buff_decode(u_int8_t *buff, size_t le
 
 				fmt++;
 			}
-			if (*fmt == '\0')
+			if (*fmt != '\0')
 				fmt++;	/* Skip '}' */
 			field_name[i] = '\0';
 			break;



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