From 22d9af36bf1716607272b25513349b3d325a3ebf Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 29 Jun 2012 13:19:17 +0100 Subject: ah MS why do you hate me so Change-Id: I268e1f5caa68668efdd2d83d1d8fe00401c6ed0f --- mythes/makefile.mk | 3 ++- mythes/mythes-ssizet.patch | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 mythes/mythes-ssizet.patch (limited to 'mythes') diff --git a/mythes/makefile.mk b/mythes/makefile.mk index 1efbc214a366..ce1005d49fe5 100644 --- a/mythes/makefile.mk +++ b/mythes/makefile.mk @@ -44,7 +44,8 @@ ADDITIONAL_FILES += makefile.mk PATCH_FILES=\ mythes-1.2.0-vanilla-th-gen-idx.patch \ mythes-1.2.0-makefile-mk.diff \ - mythes-1.2.0-android.patch + mythes-1.2.0-android.patch \ + mythes-ssizet.patch .IF "$(COM)"=="GCC" .IF "$(SYSTEM_HUNSPELL)" != "YES" diff --git a/mythes/mythes-ssizet.patch b/mythes/mythes-ssizet.patch new file mode 100644 index 000000000000..25d95165d8f2 --- /dev/null +++ b/mythes/mythes-ssizet.patch @@ -0,0 +1,20 @@ +--- misc/mythes-1.2.3/mythes.cxx 2012-06-29 13:16:55.812939142 +0100 ++++ misc/build/mythes-1.2.3/mythes.cxx 2012-06-29 13:17:21.159198507 +0100 +@@ -48,7 +48,7 @@ + len = readLine(pifile,wrd,MAX_WD_LEN); + int idxsz = atoi(wrd); + +- if (idxsz <= 0 || idxsz > std::numeric_limits::max() / sizeof(sizeof(char*))) { ++ if (idxsz <= 0 || idxsz > std::numeric_limits::max() / sizeof(sizeof(char*))) { + fprintf(stderr,"Error - bad index %d\n", idxsz); + fclose(pifile); + return 0; +@@ -176,7 +176,7 @@ + return 0; + } + int nmeanings = atoi(buf+np+1); +- if (nmeanings < 0 || nmeanings > std::numeric_limits::max() / sizeof(mentry)) ++ if (nmeanings < 0 || nmeanings > std::numeric_limits::max() / sizeof(mentry)) + nmeanings = 0; + *pme = (mentry*)(nmeanings ? malloc(nmeanings * sizeof(mentry)) : NULL); + if (!(*pme)) { -- cgit