--- readcd/readcd.c.orig	2017-09-27 09:07:34 -0500
+++ readcd/readcd.c	2017-09-27 09:23:33 -0500
@@ -2151,8 +2151,12 @@
 		end = scgp->cap->c_baddr + 1;
 	scgp->silent--;
 
-	if ((end <= 0 && isrange) || (askrange && scg_yes(_("Ignore disk size? "))))
-		end = 10000000;	/* Hack to read empty (e.g. blank=fast) disks */
+	if (end <= 1)  {
+		scgp->cap->c_baddr = 2236703;
+		end = scgp->cap->c_baddr + 1;   /* Hack that is 4.5GB */
+/*		end = 10000000;	* Hack to write empty disks */
+ 	}
+
 
 	if (parmp) {
 		if (parmp->name)
@@ -2164,6 +2168,7 @@
 		}
 
 		addr = start = parmp->start;
+
 		if (parmp->end != -1 && parmp->end < end)
 			end = parmp->end;
 		cnt = Sbufsize / secsize;
@@ -2230,6 +2235,7 @@
 	}
 
 	for (; addr < end; addr += cnt) {
+
 		if (didintr)
 			comexit(exsig);		/* XXX besseres Konzept?!*/
 
@@ -2414,6 +2420,8 @@
 
 		if ((amt = fileread(f, Sbuf, cnt * scgp->cap->c_bsize)) < 0)
 			comerr(_("Cannot read '%s'\n"), filename);
+		if (amt > end)  /* Added to stop writing to, too small of disc */
+			comerrno(EX_BAD, "Not a valid sector range \n");
 		if (amt == 0)
 			break;
 		if ((amt / scgp->cap->c_bsize) < cnt)
@@ -2422,6 +2430,11 @@
 			comerrno(scgp->scmd->ux_errno,
 					_("Cannot write destination disk\n"));
 	}
+    /*Adding Synch Cache to ensure data is committed to the disc*/
+    if (scsi_flush_cache(scgp) < 0)
+        comerrno(scgp->scmd->ux_errno,
+                    "Cannot write destination disk\n");
+
 	error(_("addr: %8ld\n"), addr);
 	msec = prstats();
 	if (msec == 0)		/* Avoid division by zero */
