|
Lines 1-5
Link Here
|
| 1 |
--- lib/rle_open_f.c.orig Thu May 13 21:28:51 1993 |
1 |
--- lib/rle_open_f.c.orig Thu May 13 16:28:51 1993 |
| 2 |
+++ lib/rle_open_f.c Wed Jan 12 16:06:07 2005 |
2 |
+++ lib/rle_open_f.c Thu Nov 29 23:38:49 2007 |
| 3 |
@@ -56,6 +56,7 @@ |
3 |
@@ -56,6 +56,7 @@ |
| 4 |
CONST_DECL char *err_str; |
4 |
CONST_DECL char *err_str; |
| 5 |
register char *cp; |
5 |
register char *cp; |
|
Lines 8-22
Link Here
|
| 8 |
|
8 |
|
| 9 |
#ifdef STDIO_NEEDS_BINARY |
9 |
#ifdef STDIO_NEEDS_BINARY |
| 10 |
char mode_string[32]; /* Should be enough. */ |
10 |
char mode_string[32]; /* Should be enough. */ |
| 11 |
@@ -63,7 +64,7 @@ |
|
|
| 12 |
/* Concatenate a 'b' onto the mode. */ |
| 13 |
mode_string[0] = mode[0]; |
| 14 |
mode_string[1] = 'b'; |
| 15 |
- strcpy( mode_string + 2, mode + 1 ); |
| 16 |
+ strncpy( mode_string + 2, mode + 1, sizeof(mode_string + 2) ); |
| 17 |
mode = mode_string; |
| 18 |
#endif |
| 19 |
|
| 20 |
@@ -150,7 +151,8 @@ |
11 |
@@ -150,7 +151,8 @@ |
| 21 |
else if ( cp > file_name && *cp == '.' && *(cp + 1) == 'Z' ) |
12 |
else if ( cp > file_name && *cp == '.' && *(cp + 1) == 'Z' ) |
| 22 |
{ |
13 |
{ |
|
Lines 42-44
Link Here
|
| 42 |
|
33 |
|
| 43 |
fp = my_popen( combuf, mode, &thepid ); |
34 |
fp = my_popen( combuf, mode, &thepid ); |
| 44 |
free( combuf ); |
35 |
free( combuf ); |
|
|
36 |
@@ -256,7 +258,6 @@ |
| 37 |
int pipefd[2]; |
| 38 |
int i; |
| 39 |
char *argv[4]; |
| 40 |
- extern int errno; |
| 41 |
|
| 42 |
/* Check args. */ |
| 43 |
if ( *mode != 'r' && *mode != 'w' ) |