patch for file-roller 2.1.2



Hello,

file-roller v2.1.2 crahes on my linux box when opening any kind of
archive.
So I had a look to the sources and found out that in source file
"fr-archive.c" an array was defined like this

"char buffer[80];"

The flowing statement caused the crash

"buffer[n]=0;"

where n was 80 !


The patch:

--- src/fr-archive.c	Sun Oct 20 21:47:26 2002
+++ src-patched/fr-archive.c	Sat Dec 21 20:21:00 2002
@@ -248,7 +248,7 @@
 	if (file == NULL) 
                 return NULL;
 	
-	n = fread (buffer, sizeof (char), sizeof (buffer), file);
+	n = fread (buffer, sizeof (char), sizeof (buffer)-1, file);
 	buffer[n] = 0;
 	
 	fclose (file);


-- Rolf Kulemann

Real computer scientists only write specs for languages that might run
on future hardware.  Nobody trusts them to write specs for anything homo
sapiens will ever be able to fit on a single planet.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]