DragonFlyBSD Kernel Audit
DF-0832 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/vfs/udf/udf_vnops.c b/sys/vfs/udf/udf_vnops.c
--- a/sys/vfs/udf/udf_vnops.c
+++ b/sys/vfs/udf/udf_vnops.c
@@ -1101,7 +1101,7 @@
 		do {
 			offset -= icblen;
 			ad_offset = sizeof(struct short_ad) * ad_num;
-			if (ad_offset > fentry->l_ad) {
+			if (ad_offset >= fentry->l_ad) {
 				kprintf("File offset out of bounds\n");
 				return(EINVAL);
 			}
@@ -1125,7 +1125,7 @@
 		do {
 			offset -= icblen;
 			ad_offset = sizeof(struct long_ad) * ad_num;
-			if (ad_offset > fentry->l_ad) {
+			if (ad_offset >= fentry->l_ad) {
 				kprintf("File offset out of bounds\n");
 				return(EINVAL);
 			}