403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.89
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/games/xmille/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/games/xmille/files/patch-ui.c
--- ui.c.orig	Tue Apr  2 12:55:55 1996
+++ ui.c	Fri Jun 15 02:20:34 2007
@@ -7,6 +7,8 @@
 # include	"mille.h"
 # include	"ui.h"
 # include	<X11/Xutil.h>
+# include	<string.h>
+# include	<stdlib.h>
 
 #ifdef CTRL
 # undef CTRL
@@ -84,7 +86,9 @@
 		return(orig);
 	if (XTextWidth (font, orig, len) < max)
 		return orig;
-	strcpy (buf, orig);
+	if (len > sizeof(buf))
+	    len = sizeof(buf);
+	strncpy (buf, orig, len);
 	do {
 		buf[--len] = '\0';
 	} while (len > 0 && XTextWidth (font, buf, len) >= max);
@@ -409,6 +413,10 @@
 	Colormap	def_cm;
 
 	dpy = XOpenDisplay ((char *) 0);
+	if (!dpy) {
+		printf("Error: Can't open X Display\n");
+		exit(1);
+	}
 	screen = DefaultScreen(dpy);
 	def_cm = DefaultColormap(dpy, screen);
 	

Youez - 2016 - github.com/yon3zu
LinuXploit