File overflow.patch of Package gle-graphics

--- src/gle/eval.cpp
+++ src/gle/eval.cpp	2012-07-09 12:02:01.544009358 +0000
@@ -939,7 +939,7 @@ void eval(int *pcode, int *cp, double *o
 	}
 	if (pcode[(*cp)] == 8) {
 		/*  Single constant  */
-		union {double d; int l[1];} both;
+		union {double d; int l[2];} both;
 		both.l[0] = *(pcode+ ++(*cp));
 		both.l[1] = 0;
 		dbg gprint("Constant %ld \n",both.l[0]);
--- src/manip/cmd.cpp
+++ src/manip/cmd.cpp	2012-07-09 12:09:18.388009416 +0000
@@ -680,7 +680,10 @@ int strcpywidth(char *dest, char *src, i
 	int i;
 	i = wid-strlen(src);
 	if (i<0) i = 0;
-	memset(buff,' ',i);
+	if (i > sizeof(buff))
+	    i = sizeof(buff);
+	if (i > 0)
+	    memset(buff,' ',i);
 	buff[i] = 0;
 	strcpy(dest,buff);
 	strcat(dest,src);
--- src/manip/eval.cpp
+++ src/manip/eval.cpp	2012-07-09 12:02:21.668009990 +0000
@@ -78,7 +78,7 @@ void eval(int32 *pcode,int *cp,double *o
 		/* place to put result number 			*/
 		/* place to put result string 			*/
 		/* place to put result type, 1=num, 2=str 	*/
-	union {double d; int32 l[1];} both;
+	union {double d; int32 l[2];} both;
 	int plen,i,c;
 	time_t today;
 	double xx;
openSUSE Build Service is sponsored by