Buffer handling bugs in glimmer

Kris Kennaway kris at obsecurity.org
Thu Jun 26 21:22:26 PDT 2003


The patches are attached.  Can someone please test this?

Kris

----- Forwarded message from Anil Madhavapeddy <avsm at cvs.openbsd.org> -----

X-Original-To: kkenn at localhost
Delivered-To: kkenn at localhost.obsecurity.org
X-Originating-IP: [128.125.38.123]
Delivered-To: kris at freebsd.org
Date: Tue, 17 Jun 2003 08:06:42 -0600 (MDT)
From: Anil Madhavapeddy <avsm at cvs.openbsd.org>
To: ports-changes at cvs.openbsd.org
Subject: CVS: cvs.openbsd.org: ports
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
X-Loop: ports-changes at openbsd.org
Precedence: list
Reply-To: Anil Madhavapeddy <avsm at cvs.openbsd.org>
X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.13.6

CVSROOT:	/cvs
Module name:	ports
Changes by:	avsm at cvs.openbsd.org	2003/06/17 08:06:42

Modified files:
	editors/glimmer: Makefile 
Added files:
	editors/glimmer/patches: patch-src_file-io_c patch-src_main_c 

Log message:
patch a couple of too-small buffers that could lead to path truncation
maintainer ok, submitted upstream

----- End forwarded message -----
-------------- next part --------------
$OpenBSD: patch-src_file-io_c,v 1.1 2003/06/17 14:06:42 avsm Exp $
--- src/file-io.c.orig	Tue Jun 17 01:52:36 2003
+++ src/file-io.c	Tue Jun 17 01:53:49 2003
@@ -102,10 +102,10 @@ void
 new_file_real (char *filename)
 {
     GnomeVFSURI *uri;
-    gchar cwd[256];
+    gchar cwd[MAXPATHLEN];
     gchar *full;
 
-    getcwd (cwd, 256);
+    getcwd (cwd, sizeof(cwd));
     full = g_strconcat (cwd, "/", filename, NULL);
     uri = gnome_vfs_uri_new (full);
     g_free (full);
-------------- next part --------------
$OpenBSD: patch-src_main_c,v 1.1 2003/06/17 14:06:42 avsm Exp $
--- src/main.c.orig	Tue Jun 17 01:53:17 2003
+++ src/main.c	Tue Jun 17 01:54:18 2003
@@ -342,7 +342,7 @@ main_finish (void *closure, int argc, ch
     gchar *path;
     gchar *file;
     gchar *full;
-    gchar cwd[256];
+    gchar cwd[MAXPATHLEN];
 
     args = (gchar **) poptGetArgs (pctx);
 
@@ -381,7 +381,7 @@ main_finish (void *closure, int argc, ch
         }
     }
     if (input_file) {
-        gchar *path, *file, *full, cwd[256];
+        gchar *path, *file, *full, cwd[MAXPATHLEN];
 
         getcwd (cwd, sizeof (cwd));
         path = get_path_from_filename (input_file);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-gnome/attachments/20030626/0b65d526/attachment.bin


More information about the freebsd-gnome mailing list