hal/hald/linux/volume_id volume_id.c,1.6,1.7

Joe Shaw joe at pdx.freedesktop.org
Mon Jun 28 08:22:10 PDT 2004


Update of /cvs/hal/hal/hald/linux/volume_id
In directory pdx:/tmp/cvs-serv27746/hald/linux/volume_id

Modified Files:
	volume_id.c 
Log Message:
2004-06-28  Joe Shaw  <joeshaw at novell.com>

	* linux/volume_id/volume_id.c (set_label_unicode16): Change
	condition to not wrap around on very short (or empty) labels.

Index: volume_id.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/volume_id/volume_id.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- volume_id.c	20 Jun 2004 17:36:00 -0000	1.6
+++ volume_id.c	28 Jun 2004 15:22:08 -0000	1.7
@@ -118,7 +118,7 @@
 	__u16 c;
 
 	j = 0;
-	for (i = 0; i <= count-2; i += 2) {
+	for (i = 0; i + 2 <= count; i += 2) {
 		if (endianess == LE)
 			c = (buf[i+1] << 8) | buf[i];
 		else





More information about the hal-commit mailing list