remove incorrect strcpy/strcat patches, pointed out by deraadt@

ok naddy@
This commit is contained in:
steven 2006-05-13 16:19:36 +00:00
parent 0875288c2e
commit 61cc795411
3 changed files with 3 additions and 33 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.7 2006/01/08 11:16:00 aanriot Exp $
# $OpenBSD: Makefile,v 1.8 2006/05/13 16:19:36 steven Exp $
COMMENT= "library for tracking application startup"
DISTNAME= startup-notification-0.8
PKGNAME= ${DISTNAME}p0
CATEGORIES= devel x11 x11/gnome
SHARED_LIBS= startup-notification-1 0.0

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-libsn_sn-launcher_c,v 1.1 2005/05/25 23:53:37 marcm Exp $
$OpenBSD: patch-libsn_sn-launcher_c,v 1.2 2006/05/13 16:19:36 steven Exp $
--- libsn/sn-launcher.c.orig Tue Oct 26 22:07:27 2004
+++ libsn/sn-launcher.c Wed May 25 16:44:54 2005
@@ -220,7 +220,7 @@ sn_launcher_context_initiate (SnLauncher
@ -19,14 +19,3 @@ $OpenBSD: patch-libsn_sn-launcher_c,v 1.1 2005/05/25 23:53:37 marcm Exp $
values[i] = workspacebuf;
++i;
}
@@ -358,8 +358,8 @@ sn_launcher_context_setup_child_process
/* Man we need glib here */
startup_id = sn_malloc (strlen (context->startup_id) + strlen ("DESKTOP_STARTUP_ID") + 3);
- strcpy (startup_id, "DESKTOP_STARTUP_ID=");
- strcat (startup_id, context->startup_id);
+ strncpy (startup_id, "DESKTOP_STARTUP_ID=", sizeof(startup_id));
+ strncat (startup_id, context->startup_id, sizeof(startup_id));
putenv (startup_id);

View File

@ -1,20 +0,0 @@
$OpenBSD: patch-libsn_sn-util_c,v 1.1 2005/05/25 23:53:37 marcm Exp $
--- libsn/sn-util.c.orig Wed May 25 16:35:54 2005
+++ libsn/sn-util.c Wed May 25 16:37:28 2005
@@ -257,7 +257,7 @@ sn_internal_strdup (const char *str)
char *s;
s = sn_malloc (strlen (str) + 1);
- strcpy (s, str);
+ strncpy (s, str, sizeof(s));
return s;
}
@@ -376,6 +376,6 @@ sn_internal_append_to_string (char
*append_to = sn_realloc (*append_to, *current_len + len + 1);
end = *append_to + *current_len;
- strcpy (end, append);
+ strncpy (end, append, sizeof(end));
*current_len = *current_len + len;
}