134affccfd
based on diffs from new maintainer Jeremy Evans <jeremyevans0 at gmail.com>
29 lines
1.3 KiB
Plaintext
29 lines
1.3 KiB
Plaintext
$OpenBSD: patch-gtk_DirectorExtension_cxx,v 1.2 2007/01/18 10:56:27 steven Exp $
|
|
--- gtk/DirectorExtension.cxx.orig Fri Mar 31 21:45:37 2006
|
|
+++ gtk/DirectorExtension.cxx Fri Mar 31 21:45:37 2006
|
|
@@ -238,6 +238,7 @@ bool DirectorExtension::CreatePipe(bool
|
|
bool tryStandardPipeCreation = false;
|
|
SString pipeFilename = host->Property("ipc.scite.name");
|
|
gchar* pipeName = NULL;
|
|
+ size_t pipeName_size = 0;
|
|
fdReceiver = -1;
|
|
inputWatcher = -1;
|
|
|
|
@@ -247,6 +248,7 @@ bool DirectorExtension::CreatePipe(bool
|
|
//fprintf(fdDebug, "CreatePipe: if (pipeFilename.size() > 0): %s\n", pipeFilename.c_str());
|
|
//snprintf(pipeName, CHAR_MAX - 1, "%s", pipeFilename.c_str());
|
|
pipeName = g_strdup(pipeFilename.c_str());
|
|
+ pipeName_size = strlen(pipeName) + 1;
|
|
fdReceiver = open(pipeName, O_RDWR | O_NONBLOCK);
|
|
if (fdReceiver == -1 && errno == EACCES) {
|
|
//fprintf(fdDebug, "CreatePipe: No access\n");
|
|
@@ -294,7 +296,7 @@ bool DirectorExtension::CreatePipe(bool
|
|
|
|
//create the pipe name - we use a number as well just incase multiple people have pipes open
|
|
//or we are forceing a new instance of scite (even if there is already one)
|
|
- sprintf(pipeName, "/tmp/.SciTE.%d.ipc", i);
|
|
+ snprintf(pipeName, pipeName_size, "/tmp/.SciTE.%d.ipc", i);
|
|
|
|
//fprintf(fdDebug, "Trying pipe %s\n", pipeName);
|
|
//check to see if there is already one
|