diff -r e1c226a4de34 -r cef565f1c325 mozilla-icu-strncat.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mozilla-icu-strncat.patch Mon Apr 14 09:09:11 2014 +0200 @@ -0,0 +1,35 @@ +# HG changeset patch +# Parent 29be2a4daa0f512d22bde85b97b5460839026571 +# User Wolfgang Rosenauer +From: Jan Engelhardt +Reference: http://bugs.icu-project.org/trac/ticket/7808 + +diff --git a/intl/icu/source/tools/pkgdata/pkgdata.cpp b/intl/icu/source/tools/pkgdata/pkgdata.cpp +--- a/intl/icu/source/tools/pkgdata/pkgdata.cpp ++++ b/intl/icu/source/tools/pkgdata/pkgdata.cpp +@@ -1975,22 +1975,22 @@ static void loadLists(UPKGOptions *o, UE + FILE *p = NULL; + size_t n; + static char buf[512] = ""; + char cmdBuf[1024]; + UErrorCode status = U_ZERO_ERROR; + const char cmd[] = "icu-config --incpkgdatafile"; + + /* #1 try the same path where pkgdata was called from. */ +- findDirname(progname, cmdBuf, 1024, &status); ++ findDirname(progname, cmdBuf, sizeof(cmdBuf), &status); + if(U_SUCCESS(status)) { + if (cmdBuf[0] != 0) { +- uprv_strncat(cmdBuf, U_FILE_SEP_STRING, 1024); ++ uprv_strncat(cmdBuf, U_FILE_SEP_STRING, sizeof(cmdBuf)-1-strlen(cmdBuf)); + } +- uprv_strncat(cmdBuf, cmd, 1024); ++ uprv_strncat(cmdBuf, cmd, sizeof(cmdBuf)-1-strlen(cmdBuf)); + + if(verbose) { + fprintf(stdout, "# Calling icu-config: %s\n", cmdBuf); + } + p = popen(cmdBuf, "r"); + } + + if(p == NULL || (n = fread(buf, 1, 511, p)) <= 0) {