View | Details | Raw Unified | Return to bug 118344
Collapse All | Expand All

(-)urt/files/patch-cnv::gif2rle.c (-3 / +41 lines)
Lines 1-6 Link Here
1
--- cnv/giftorle.c.orig	Thu Mar 10 20:04:40 2005
1
--- cnv/giftorle.c.orig	Mon Oct 18 08:59:37 1993
2
+++ cnv/giftorle.c	Thu Mar 10 20:07:12 2005
2
+++ cnv/giftorle.c	Thu Nov 29 10:42:17 2007
3
@@ -278,7 +278,7 @@
3
@@ -21,7 +21,10 @@
4
 /* |   don't try to make money off it, or pretend that you wrote it.  | */
5
 /* +------------------------------------------------------------------+ */
6
 
7
+#include	<stdlib.h>
8
 #include	<stdio.h>
9
+#include	<unistd.h>
10
+
11
 #include	"rle.h"
12
 
13
 #ifndef lint
14
@@ -69,7 +72,7 @@
15
 
16
 static int output_colormap = FALSE;
17
 
18
-void
19
+int
20
 main(argc,argv)
21
 int	argc;
22
 char	**argv;
23
@@ -96,7 +99,7 @@
24
 
25
     while ( nfname-- > 0 )
26
 	(void)ReadGIF( *infname++ );
27
-    exit( 0 );
28
+    return( 0 );
29
 }
30
 
31
 int
32
@@ -203,7 +206,7 @@
33
 	    EasyFail("EOF in extention\n",TRUE);
34
 	if (c == 0)
35
 	    return FALSE;
36
-	if (read(fd,buf,(int) c)!=(int) c) 
37
+	if (read(fileno(fd),buf,(int) c)!=(int) c) 
38
 	    EasyFail("EOF in extention\n",TRUE);
39
     }
40
 }
41
@@ -278,7 +281,7 @@
4
 	max_code_size = 2*clear_code;
42
 	max_code_size = 2*clear_code;
5
 	max_code = clear_code+2;
43
 	max_code = clear_code+2;
6
 
44
 
(-)urt/files/patch-cnv::rlatorle.c (+11 lines)
Line 0 Link Here
1
--- cnv/rlatorle.c.orig	Thu Nov 29 22:14:43 2007
2
+++ cnv/rlatorle.c	Thu Nov 29 22:15:43 2007
3
@@ -162,7 +162,7 @@
4
        }
5
    VPRINTF(stderr, "Channel color space %s\n", head.rla_head.chan);
6
    if ( rlb_flag )
7
-       VPRINTF(stderr, "Interlaced?         %s\n", head.rlb_head.filter_type);
8
+       VPRINTF(stderr, "Interlaced?         %hd\n", head.rlb_head.filter_type);
9
    else
10
        VPRINTF(stderr, "Interlaced?         %s\n", "-unused-");
11
    if (do_matte)
(-)urt/files/patch-get::getx11::map_scan.c (+11 lines)
Line 0 Link Here
1
--- get/getx11/map_scan.c.orig	Thu Nov 29 22:24:53 2007
2
+++ get/getx11/map_scan.c	Thu Nov 29 22:26:37 2007
3
@@ -2195,7 +2195,7 @@
4
     
5
     if (!img->divN || !img->modN || !img->dm16 )
6
     {
7
-	fprintf( stderr, "%s: malloc error getting dither arrays\n");
8
+	fprintf( stderr, "%s: malloc error getting dither arrays\n", progname);
9
 	exit (1);
10
     }
11
 }
(-)urt/files/patch-get::getx11::x11_stuff.c (+36 lines)
Line 0 Link Here
1
--- get/getx11/x11_stuff.c.orig	Fri May 13 20:05:44 1994
2
+++ get/getx11/x11_stuff.c	Thu Nov 29 22:48:26 2007
3
@@ -40,7 +40,7 @@
4
  */
5
 #include "getx11.h"
6
 #ifdef X_SHARED_MEMORY
7
-#include <sys/errno.h>
8
+#include <errno.h>
9
 #endif
10
 
11
 #include "circle.bitmap"
12
@@ -155,7 +155,6 @@
13
 			IPC_CREAT|0777 );
14
 	    if ( img->shm_img.shmid < 0 )
15
 	    {
16
-		extern int errno;
17
 		if ( errno == ENOSPC )
18
 		{
19
 		    if ( !no_shared_space )
20
@@ -333,7 +332,7 @@
21
     
22
     if (( img->pixmap != NULL && reallocate ) ||
23
 	( img->pixmap != NULL && (img->pix_w < iw || img->pix_h < ih ))){
24
-	free_X_pixmap( dpy, img->pixmap );
25
+	free_X_pixmap( img, img->pixmap );
26
 	img->pixmap = NULL;
27
     }
28
     
29
@@ -361,7 +360,6 @@
30
 	    XDestroyImage( image );
31
 	    if ( img->shm_pix.shmid < 0 )
32
 	    {
33
-		extern int errno;
34
 		if ( errno == ENOSPC )
35
 		{
36
 		    if ( !no_shared_space )
(-)urt/files/patch-lib-rle_open_f.c (-11 / +10 lines)
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' )
(-)urt/files/patch-lib::rle_hdr.c (+11 lines)
Line 0 Link Here
1
--- lib/rle_hdr.c.orig	Thu Nov 29 21:57:53 2007
2
+++ lib/rle_hdr.c	Thu Nov 29 21:59:23 2007
3
@@ -269,6 +269,8 @@
4
 {
5
     rle_hdr *ret_hdr;
6
 
7
+    if ( rle_dflt_hdr.rle_file == NULL)
8
+    	rle_dflt_hdr.rle_file = stdout;
9
     if ( the_hdr == &rle_dflt_hdr )
10
 	return the_hdr;
11
 
(-)urt/files/patch-lib::scanargs.c (-2 / +12 lines)
Lines 1-5 Link Here
1
--- lib/scanargs.c.orig	Thu Mar 10 21:23:06 2005
1
--- lib/scanargs.c.orig	Thu Feb 27 16:18:15 1992
2
+++ lib/scanargs.c	Thu Mar 10 21:25:26 2005
2
+++ lib/scanargs.c	Thu Nov 29 23:22:40 2007
3
@@ -128,10 +128,10 @@
3
@@ -128,10 +128,10 @@
4
 va_list argl;
4
 va_list argl;
5
 {
5
 {
Lines 13-15 Link Here
13
     int	    optarg = 0;			/* where optional args start */
13
     int	    optarg = 0;			/* where optional args start */
14
     int	    nopt = 0;
14
     int	    nopt = 0;
15
     char    tmpflg,			/* temp flag */
15
     char    tmpflg,			/* temp flag */
16
@@ -408,7 +408,8 @@
17
 				 * Copy the string so we remain nondestructive
18
 				 */
19
 				s = NEW( char, strlen(argp)+1 );
20
-				strcpy( s, argp );
21
+				strncpy( s, argp, sizeof(s)-1 );
22
+				s[sizeof(s) - 1] = '\0';
23
 				argp = s;
24
 
25
 				/* 
(-)urt/files/patch-tools::into.c (-4 / +16 lines)
Lines 1-6 Link Here
1
--- tools/into.c.orig	Thu Apr 30 23:10:15 1992
1
--- tools/into.c.orig	Thu Apr 30 09:10:15 1992
2
+++ tools/into.c	Fri Dec 27 23:23:48 2002
2
+++ tools/into.c	Thu Nov 29 16:17:55 2007
3
@@ -41,7 +41,10 @@
3
@@ -41,9 +41,12 @@
4
 short forceflg;				/* overwrite an unwritable file? */
4
 short forceflg;				/* overwrite an unwritable file? */
5
 
5
 
6
 extern int errno;
6
 extern int errno;
Lines 9-13 Link Here
9
 extern char *sys_errlist[];
9
 extern char *sys_errlist[];
10
+#endif
10
+#endif
11
 
11
 
12
 void
12
-void
13
+int
13
 main(argc, argv)
14
 main(argc, argv)
15
 int argc;
16
 char **argv;
17
@@ -82,7 +85,7 @@
18
     }
19
     else
20
 	strcpy( buf, temp );
21
-    mktemp( buf );
22
+    mkstemp( buf );
23
 
24
     if ( (outf = fopen( buf, "w" )) == NULL )
25
     {
(-)urt/files/patch-tools::rleaddcom.c (+20 lines)
Line 0 Link Here
1
--- tools/rleaddcom.c.orig	Thu Nov 29 16:12:38 2007
2
+++ tools/rleaddcom.c	Thu Nov 29 16:25:14 2007
3
@@ -60,7 +60,7 @@
4
  * Algorithm:
5
  *	[None]
6
  */
7
-void
8
+int
9
 main( argc, argv )
10
 int argc;
11
 char **argv;
12
@@ -118,7 +118,7 @@
13
 	}
14
 	else
15
 	    strcpy( buf, temp );
16
-	mktemp( buf );
17
+	mkstemp( buf );
18
 #ifndef NO_OPEN_PIPES
19
 	/* Compressed file special case. */
20
 	cp = i_fname + strlen( i_fname ) - 2;
(-)urt/files/patch-tools::rlecat.c (+20 lines)
Line 0 Link Here
1
--- tools/rlecat.c.orig	Thu Nov 29 16:39:51 2007
2
+++ tools/rlecat.c	Thu Nov 29 16:40:44 2007
3
@@ -62,7 +62,7 @@
4
  *  	repeat count.  If the collation flag (-c) is specified, then
5
  *  	all images will be read before starting to repeat.
6
  */
7
-void
8
+int
9
 main( argc, argv )
10
 int argc;
11
 char **argv;
12
@@ -110,7 +110,7 @@
13
 	    nflag = 0;		/* Not really repeating! */
14
 	else
15
 	{
16
-	    mktemp( temp );	/* Make a temporary file name */
17
+	    mkstemp( temp );	/* Make a temporary file name */
18
 	    tmpfile = rle_open_f( cmd_name( argv ), temp, "w+" );
19
 	}
20
     }

Return to bug 118344