aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libopensp/opensp_1.5.2-13.diff
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/libopensp/opensp_1.5.2-13.diff
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/libopensp/opensp_1.5.2-13.diff')
-rw-r--r--vcpkg/ports/libopensp/opensp_1.5.2-13.diff37
1 files changed, 37 insertions, 0 deletions
diff --git a/vcpkg/ports/libopensp/opensp_1.5.2-13.diff b/vcpkg/ports/libopensp/opensp_1.5.2-13.diff
new file mode 100644
index 0000000..9278123
--- /dev/null
+++ b/vcpkg/ports/libopensp/opensp_1.5.2-13.diff
@@ -0,0 +1,37 @@
+--- opensp-1.5.2.orig/sx/XmlOutputEventHandler.cxx
++++ opensp-1.5.2/sx/XmlOutputEventHandler.cxx
+@@ -1199,12 +1199,22 @@
+ // Check to make sure we haven't passed outside of the
+ // output directory
+ char *dirs = strdup (filePath);
++#ifdef MAXPATHLEN
+ char realDirs[MAXPATHLEN];
+ char realOutputDir[MAXPATHLEN];
++#else
++ char *realDirs;
++ char *realOutputDir;
++#endif
+ char *outputDir = strdup(outputDir_);
+
++#ifdef MAXPATHLEN
+ realpath((const char *)dirname(dirs), realDirs);
+ realpath((const char *)dirname(outputDir), realOutputDir);
++#else
++ realDirs = realpath((const char *)dirname(dirs), NULL);
++ realOutputDir = realpath((const char *)dirname(outputDir), NULL);
++#endif
+
+ if (strncmp(realDirs, realOutputDir, strlen (realOutputDir)) != 0) {
+ app_->message(XmlOutputMessages::pathOutsideOutputDirectory,
+@@ -1214,6 +1224,11 @@
+ }
+ }
+
++#ifndef MAXPATHLEN
++ free(realDirs);
++ free(realOutputDir);
++#endif
++
+ // Make the necessary directories
+ maybeCreateDirectories(dirname(dirs));
+