[124145] trunk/base/src/darwintracelib1.0/proc.c

cal at macports.org cal at macports.org
Tue Aug 19 16:09:50 PDT 2014


Revision: 124145
          https://trac.macports.org/changeset/124145
Author:   cal at macports.org
Date:     2014-08-19 16:09:50 -0700 (Tue, 19 Aug 2014)
Log Message:
-----------
base: darwintrace: fix off by one error that may have caused incorrect sandbox bounds

See https://lists.macosforge.org/pipermail/macports-dev/2014-August/027696.html, which was probably caused by this.

Modified Paths:
--------------
    trunk/base/src/darwintracelib1.0/proc.c

Modified: trunk/base/src/darwintracelib1.0/proc.c
===================================================================
--- trunk/base/src/darwintracelib1.0/proc.c	2014-08-19 21:35:44 UTC (rev 124144)
+++ trunk/base/src/darwintracelib1.0/proc.c	2014-08-19 23:09:50 UTC (rev 124145)
@@ -91,7 +91,7 @@
 		if (NULL != (val = getenv(#name))) {\
 			size_t lenName = strlen(#name);\
 			size_t lenVal  = strlen(val);\
-			if (NULL == (variable = malloc(lenName + lenVal + 0 + 1))) {\
+			if (NULL == (variable = malloc(lenName + 1 + lenVal + 1))) {\
 				perror("darwintrace: malloc");\
 				abort();\
 			}\
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140819/b5ecaa1b/attachment.html>


More information about the macports-changes mailing list