Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /src/cd-paranoia/cd-paranoia.c [df4da9] .. [bcd670] Maximize Restore

  Switch to side-by-side view

--- a/src/cd-paranoia/cd-paranoia.c
+++ b/src/cd-paranoia/cd-paranoia.c
@@ -1154,16 +1154,16 @@
 	    if(file[0]=='\0'){
 	      switch (output_type) {
 	      case 0: /* raw */
-		strcat(outfile_name, "cdda.raw");
+		strncat(outfile_name, "cdda.raw", sizeof("cdda.raw"));
 		break;
 	      case 1:
-		strcat(outfile_name, "cdda.wav");
+		strncat(outfile_name, "cdda.wav", sizeof("cdda.wav"));
 		break;
 	      case 2:
-		strcat(outfile_name, "cdda.aifc");
+		strncat(outfile_name, "cdda.aifc", sizeof("cdda.aifc"));
 		break;
 	      case 3:
-		strcat(outfile_name, "cdda.aiff");
+		strncat(outfile_name, "cdda.aiff", sizeof("cdda.aiff"));
 		break;
 	      }
 	    }
@@ -1185,16 +1185,16 @@
 	  
 	  switch(output_type){
 	  case 0: /* raw */
-	    strcat(outfile_name,"cdda.raw");
+	    strncat(outfile_name, "cdda.raw", sizeof("cdda.raw"));
 	    break;
 	  case 1:
-	    strcat(outfile_name,"cdda.wav");
+	    strncat(outfile_name, "cdda.wav", sizeof("cdda.wav"));
 	    break;
 	  case 2:
-	    strcat(outfile_name,"cdda.aifc");
+	    strncat(outfile_name, "cdda.aifc", sizeof("cdda.aifc"));
 	    break;
 	  case 3:
-	    strcat(outfile_name,"cdda.aiff");
+	    strncat(outfile_name, "cdda.aiff", sizeof("cdda.aiff"));
 	    break;
 	  }