summaryrefslogtreecommitdiff
path: root/x11/openmotif/patches/patch-bk
blob: 0ea84c1ff0b28fa9a628e152e9bdaa7c2eee5cbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$NetBSD: patch-bk,v 1.1 2006/01/07 21:08:12 joerg Exp $

--- clients/uil/UilSrcSrc.c.orig	2006-01-06 20:50:23.000000000 +0100
+++ clients/uil/UilSrcSrc.c
@@ -629,8 +629,10 @@ open_source_file( XmConst char          
     char			buffer[256];
 
 
-    /* place the file name in the expanded_name buffer */
+    if (strlen(c_file_name) >= sizeof(buffer + 1))
+	return src_k_open_error;
 
+    /* place the file name in the expanded_name buffer */
     strcpy(buffer, c_file_name);
 
 /*    Determine if this is the main file or an include file.  */