Updated core
[LibreOffice.git] / mythes / mythes-ssizet.patch
blob25d95165d8f29248be867a04925162f2eea95238
1 --- misc/mythes-1.2.3/mythes.cxx 2012-06-29 13:16:55.812939142 +0100
2 +++ misc/build/mythes-1.2.3/mythes.cxx 2012-06-29 13:17:21.159198507 +0100
3 @@ -48,7 +48,7 @@
4 len = readLine(pifile,wrd,MAX_WD_LEN);
5 int idxsz = atoi(wrd);
7 - if (idxsz <= 0 || idxsz > std::numeric_limits<ssize_t>::max() / sizeof(sizeof(char*))) {
8 + if (idxsz <= 0 || idxsz > std::numeric_limits<int>::max() / sizeof(sizeof(char*))) {
9 fprintf(stderr,"Error - bad index %d\n", idxsz);
10 fclose(pifile);
11 return 0;
12 @@ -176,7 +176,7 @@
13 return 0;
15 int nmeanings = atoi(buf+np+1);
16 - if (nmeanings < 0 || nmeanings > std::numeric_limits<ssize_t>::max() / sizeof(mentry))
17 + if (nmeanings < 0 || nmeanings > std::numeric_limits<int>::max() / sizeof(mentry))
18 nmeanings = 0;
19 *pme = (mentry*)(nmeanings ? malloc(nmeanings * sizeof(mentry)) : NULL);
20 if (!(*pme)) {