File dosbox-0.72-strncat.diff of Package dosbox

fix wrong use of strncat.

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>

Index: dosbox-0.72/src/dos/dos_programs.cpp
===================================================================
--- dosbox-0.72.orig/src/dos/dos_programs.cpp
+++ dosbox-0.72/src/dos/dos_programs.cpp
@@ -807,8 +807,10 @@ void LOADFIX::Run(void) 
 			args[0] = 0;
 			do {
 				ok = cmd->FindCommand(commandNr++,temp_line);
-				strncat(args,temp_line.c_str(),256);
-				strncat(args," ",256);
+				if(sizeof(args)-strlen(args)-1 < temp_line.length()+1)
+					break;
+				strcat(args,temp_line.c_str());
+				strcat(args," ");
 			} while (ok);			
 			// Use shell to start program
 			DOS_Shell shell;
openSUSE Build Service is sponsored by