On 1.4.2013 22:37, Erik de Castro Lopo wrote:> Janne Hyv?rinen wrote:
>
>> Zip with random patches:
>>
>> flac_mac: fixes some missing parameters from safe string handling
>> changes in flac_mac's main.c
>> flac_mac_project: adds flac's include dir for the project so new
>> functions can be found
>> progress_display: flac testing progress display used old functions that
>> didn't get utf-8 decoding
>> msvc_flac_version: changes versions number from 1.3.0pre2 to 1.3.0pre3
>> compat_h_msvc_fix: fixes compiling on MSVC
> Applied, thanks!
>
> Erik
Surprisingly flac_mac had mistakenly gotten extra parameters for safe
string functions requiring further patching.
And here's patches for the changes in git for flactimer.
I noticed compat.h patch didn't make it into git. I know it may not be
perfect patch but unistd.h is in two different #ifdef checks. First one
is fine when it's excluded on _WIN32 but second check gives is for
everyone if __CYGWIN__ or __EMX__ isn't defined. That has to be a mistake.
-------------- next part --------------
diff --git a/src/monkeys_audio_utilities/flac_mac/main.c
b/src/monkeys_audio_utilities/flac_mac/main.c
index 8c8fa3d..8ffa5b6 100644
--- a/src/monkeys_audio_utilities/flac_mac/main.c
+++ b/src/monkeys_audio_utilities/flac_mac/main.c
@@ -133,7 +133,7 @@ int main(int argc, char *argv[])
/* for the full 'from' and 'to' paths for the renamer process
*/
p = strrchr(argv[from_arg],'\\');
safe_strncat(from, p? p+1 : argv[from_arg], sizeof(from));
- safe_strncpy(to, from, sizeof(to), sizeof(to));
+ safe_strncpy(to, from, sizeof(to));
cptr = strrchr(from,'.');
if(cptr == NULL)
-------------- next part --------------
diff --git a/src/utils/flactimer/main.cpp b/src/utils/flactimer/main.cpp
index 068d518..85e8a33 100644
--- a/src/utils/flactimer/main.cpp
+++ b/src/utils/flactimer/main.cpp
@@ -19,6 +19,8 @@
#include <stdio.h>
#include <string.h>
#include <windows.h>
+#include "share/compat.h"
+#include "share/safe_str.h"
#define int64_t __int64
#define uint64_t unsigned int64_t
@@ -106,8 +108,8 @@ int main(int argc, char *argv[])
args[0] = '\0';
for(i = 0; i < argc; i++) {
if(i > 0)
- safe_strncat(args, sizeof(args), " ");
- safe_strncat(args, sizeof(args), argv[i]);
+ safe_strncat(args, " ", sizeof(args));
+ safe_strncat(args, argv[i], sizeof(args));
}
//fprintf(stderr, "@@@ cmd=[%s] args=[%s]\n", argv[0], args);
-------------- next part --------------
diff --git a/src/utils/flactimer/flactimer.vcproj
b/src/utils/flactimer/flactimer.vcproj
index 3011f15..4496fa2 100644
--- a/src/utils/flactimer/flactimer.vcproj
+++ b/src/utils/flactimer/flactimer.vcproj
@@ -39,7 +39,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="."
+ AdditionalIncludeDirectories=".;..\..\..\include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -116,7 +116,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="true"
WholeProgramOptimization="true"
- AdditionalIncludeDirectories="."
+ AdditionalIncludeDirectories=".;..\..\..\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="0"
BufferSecurityCheck="false"
@@ -195,7 +195,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="true"
WholeProgramOptimization="true"
- AdditionalIncludeDirectories="."
+ AdditionalIncludeDirectories=".;..\..\..\include"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="0"
BufferSecurityCheck="false"