From: <se...@us...> - 2008-02-07 20:58:19
|
Revision: 2801 http://hugin.svn.sourceforge.net/hugin/?rev=2801&view=rev Author: sebpz Date: 2008-02-07 12:58:16 -0800 (Thu, 07 Feb 2008) Log Message: ----------- Fix for Seg Fault in Component_ToString Modified Paths: -------------- autopano-sift-C/trunk/MatchKeys.c Modified: autopano-sift-C/trunk/MatchKeys.c =================================================================== --- autopano-sift-C/trunk/MatchKeys.c 2008-02-07 16:02:03 UTC (rev 2800) +++ autopano-sift-C/trunk/MatchKeys.c 2008-02-07 20:58:16 UTC (rev 2801) @@ -963,7 +963,7 @@ if (first) { first = false; } else { - if (strlen(buffer) + 2 + 1< buflen) { + if (strlen(buffer) + 2 + 1> buflen) { buflen += buflen; buffer = (char*) realloc(buffer, buflen); } @@ -972,7 +972,7 @@ } char* justFile = FullPathToFileName(filename); - if (strlen(buffer) + strlen(justFile) + 1 < buflen -1) { + if (strlen(buffer) + strlen(justFile) + 1 > buflen -1) { if (buflen + 1 < strlen(justFile) ) buflen += strlen(justFile) + 1; else buflen += buflen; buffer = (char*) realloc(buffer, buflen); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |