[packages/glitz] - compilation fix

witekfl witekfl at pld-linux.org
Tue Jan 14 13:08:23 CET 2014


commit ba5a1a316c647367c6276a9b9adbbc1d36b6227f
Author: Witold Filipczyk <witekfl at poczta.onet.pl>
Date:   Tue Jan 14 13:07:38 2014 +0100

    - compilation fix

 format-security.patch | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)
---
diff --git a/format-security.patch b/format-security.patch
new file mode 100644
index 0000000..a9c5873
--- /dev/null
+++ b/format-security.patch
@@ -0,0 +1,68 @@
+--- glitz-0.5.6/src/glitz_program.c.orig	2006-03-13 14:43:57.000000000 +0100
++++ glitz-0.5.6/src/glitz_program.c	2014-01-14 13:03:19.556449024 +0100
+@@ -22,6 +22,8 @@
+  *
+  * Author: David Reveman <davidr at novell.com>
+  */
++#define _GNU_SOURCE
++#include <string.h>
+ 
+ #ifdef HAVE_CONFIG_H
+ #  include "../config.h"
+@@ -488,7 +490,7 @@ _glitz_create_fragment_program (glitz_co
+ 	p += sprintf (p, buffer, id, id - 1, tex, extra_declarations);
+ 
+ 	_string_array_to_char_array (buffer, pos_to_position);
+-	p += sprintf (p, buffer);
++	p = stpcpy (p, buffer);
+ 
+ 	_string_array_to_char_array (buffer, _convolution_sample_first);
+ 	p += sprintf (p, buffer, tex, texture_type);
+@@ -526,7 +528,7 @@ _glitz_create_fragment_program (glitz_co
+ 	    p += sprintf (p, buffer, 1, 0, id, 1, id, tex, extra_declarations);
+ 
+ 	    _string_array_to_char_array (buffer, pos_to_position);
+-	    p += sprintf (p, buffer);
++	    p = stpcpy (p, buffer);
+ 
+ 	    _string_array_to_char_array (buffer,
+ 					 _linear_gradient_calculations);
+@@ -536,25 +538,25 @@ _glitz_create_fragment_program (glitz_co
+ 			  extra_declarations);
+ 
+ 	    _string_array_to_char_array (buffer, pos_to_position);
+-	    p += sprintf (p, buffer);
++	    p = stpcpy (p, buffer);
+ 
+ 	    _string_array_to_char_array (buffer,
+ 					 _radial_gradient_calculations);
+ 	    break;
+ 	}
+ 
+-	p += sprintf (p, buffer);
++	p = stpcpy (p, buffer);
+ 
+ 	switch (fp_type) {
+ 	case GLITZ_FP_LINEAR_GRADIENT_REPEAT:
+ 	case GLITZ_FP_RADIAL_GRADIENT_REPEAT:
+ 	    _string_array_to_char_array (buffer, _gradient_fill_repeat);
+-	    p += sprintf (p, buffer);
++	    p = stpcpy (p, buffer);
+ 	    break;
+ 	case GLITZ_FP_LINEAR_GRADIENT_REFLECT:
+ 	case GLITZ_FP_RADIAL_GRADIENT_REFLECT:
+ 	    _string_array_to_char_array (buffer, _gradient_fill_reflect);
+-	    p += sprintf (p, buffer);
++	    p = stpcpy (p, buffer);
+ 	    break;
+ 	default:
+ 	    break;
+@@ -589,7 +591,7 @@ _glitz_create_fragment_program (glitz_co
+ 	p += sprintf (p, buffer, tex, extra_declarations);
+ 
+ 	_string_array_to_char_array (buffer, pos_to_position);
+-	p += sprintf (p, buffer);
++	p = stpcpy (p, buffer);
+ 
+ 	_string_array_to_char_array (buffer, _colorspace_yv12);
+ 	p += sprintf (p, buffer, tex, texture_type, tex, texture_type,
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/glitz.git/commitdiff/93de9fcdd439945f22d591ab560f19b4e7e1525d



More information about the pld-cvs-commit mailing list