pkgsrc/graphics/blender/patches/patch-aa
joerg a90eff9301 Fix an Apple specific buffer overflow. To skip the first argument from
Finder, some copying to and from a local buffer in main is done, without
argument checking.

When a web browser or MUA is configured to start Blender automatically,
this might be exploitable to gain priviledges of the current user.

This is related to CVE-2005-3151.
2006-02-12 21:52:18 +00:00

14 lines
481 B
Text

$NetBSD: patch-aa,v 1.5 2006/02/12 21:52:19 joerg Exp $
--- intern/ghost/intern/GHOST_SystemCarbon.cpp.orig 2006-02-12 22:17:07.000000000 +0100
+++ intern/ghost/intern/GHOST_SystemCarbon.cpp
@@ -527,7 +527,8 @@ static char g_firstFileBuf[512];
extern "C" int GHOST_HACK_getFirstFile(char buf[512]) {
if (g_hasFirstFile) {
- strcpy(buf, g_firstFileBuf);
+ strncpy(buf, g_firstFileBuf, sizeof(buf) - 1);
+ buf[sizeof(buf) - 1] = '\0';
return 1;
} else {
return 0;