7f08f73fef
-- The OpenGL Utility Toolkit, a window system independent toolkit for writing OpenGL programs. It implements a simple windowing application programming interface (API) for OpenGL. GLUT is designed for constructing small to medium sized OpenGL programs. While GLUT is well-suited to learning OpenGL and developing simple OpenGL applications, GLUT is not a full-featured toolkit so large applications requiring sophisticated user interfaces are better off using native window system toolkits like Motif. WWW: http://reality.sgi.com/opengl/glut3/glut3.html Submitted by Dan Weeks <danimal@danimal.org>
35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
$OpenBSD: patch-lib_mui_browseparse_c,v 1.1.1.1 2001/06/20 18:55:24 lebel Exp $
|
|
--- lib/mui/browseparse.c.orig Fri Aug 7 20:15:06 1998
|
|
+++ lib/mui/browseparse.c Wed Jun 20 12:11:38 2001
|
|
@@ -58,15 +58,15 @@ void parsebrowsefile(FILE *f)
|
|
while (0 != fgets(buffer, 299, f))
|
|
switch(buffer[0]) {
|
|
case 'D':
|
|
- strcpy(currentdirectoryname, &buffer[2]);
|
|
+ strlcpy(currentdirectoryname, &buffer[2], sizeof(currentdirectoryname));
|
|
nukecr(currentdirectoryname);
|
|
break;
|
|
case 'F':
|
|
- strcpy(currentfilename, &buffer[2]);
|
|
+ strlcpy(currentfilename, &buffer[2], sizeof(currentfilename));
|
|
nukecr(currentfilename);
|
|
break;
|
|
case 'P':
|
|
- strcpy(browseprompt, &buffer[2]);
|
|
+ strlcpy(browseprompt, &buffer[2], sizeof(browseprompt));
|
|
nukecr(browseprompt);
|
|
break;
|
|
case 'X':
|
|
@@ -86,9 +86,9 @@ void setcurrentfilename(char *s)
|
|
sptr = &s[len-1];
|
|
while (sptr != s) {
|
|
if (*sptr == '/') {
|
|
- strcpy(currentfilename, sptr+1);
|
|
+ strlcpy(currentfilename, sptr+1, sizeof(currentfilename));
|
|
*sptr = 0;
|
|
- strcpy(currentdirectoryname, s);
|
|
+ strlcpy(currentdirectoryname, s, sizeof(currentdirectoryname));
|
|
return;
|
|
}
|
|
sptr--;
|