You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/07/19 03:18:37 UTC
[lucy-commits] svn commit: r1148120 - in /incubator/lucy/branches/0.2: ./
clownfish/src/CFCBindFile.c
Author: marvin
Date: Tue Jul 19 01:18:37 2011
New Revision: 1148120
URL: http://svn.apache.org/viewvc?rev=1148120&view=rev
Log:
Fix a memory error in the Clownfish compiler.
Invalid read, and potentially an invalid write depending on what's at the
memory location.
Modified:
incubator/lucy/branches/0.2/ (props changed)
incubator/lucy/branches/0.2/clownfish/src/CFCBindFile.c
Propchange: incubator/lucy/branches/0.2/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul 19 01:18:37 2011
@@ -1 +1 @@
-/incubator/lucy/trunk:1148076
+/incubator/lucy/trunk:1148076,1148119
Modified: incubator/lucy/branches/0.2/clownfish/src/CFCBindFile.c
URL: http://svn.apache.org/viewvc/incubator/lucy/branches/0.2/clownfish/src/CFCBindFile.c?rev=1148120&r1=1148119&r2=1148120&view=diff
==============================================================================
--- incubator/lucy/branches/0.2/clownfish/src/CFCBindFile.c (original)
+++ incubator/lucy/branches/0.2/clownfish/src/CFCBindFile.c Tue Jul 19 01:18:37 2011
@@ -37,7 +37,7 @@ CFCBindFile_write_h(CFCFile *file, const
char *h_path = (char*)MALLOCATE(h_path_buf_size);
CFCFile_h_path(file, h_path, h_path_buf_size, dest);
char *h_dir = CFCUtil_strdup(h_path);
- for (size_t len = h_path_buf_size; len--;) {
+ for (size_t len = strlen(h_dir); len--;) {
if (h_dir[len] == CFCUTIL_PATH_SEP_CHAR) {
h_dir[len] = 0;
break;