PageRenderTime 50ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/mythes/mythes-ssizet.patch

https://bitbucket.org/markjenkins/libreoffice_ubuntu-debian-fixes
Patch | 20 lines | 19 code | 1 blank | 0 comment | 0 complexity | 205d71b4ab6bca0f7519e487c582562c MD5 | raw file
Possible License(s): GPL-3.0, LGPL-3.0, MPL-2.0-no-copyleft-exception, LGPL-2.1, BSD-3-Clause-No-Nuclear-License-2014
  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);
  6. - if (idxsz <= 0 || idxsz > std::numeric_limits<ssize_t>::max() / sizeof(sizeof(char*))) {
  7. + if (idxsz <= 0 || idxsz > std::numeric_limits<int>::max() / sizeof(sizeof(char*))) {
  8. fprintf(stderr,"Error - bad index %d\n", idxsz);
  9. fclose(pifile);
  10. return 0;
  11. @@ -176,7 +176,7 @@
  12. return 0;
  13. }
  14. int nmeanings = atoi(buf+np+1);
  15. - if (nmeanings < 0 || nmeanings > std::numeric_limits<ssize_t>::max() / sizeof(mentry))
  16. + if (nmeanings < 0 || nmeanings > std::numeric_limits<int>::max() / sizeof(mentry))
  17. nmeanings = 0;
  18. *pme = (mentry*)(nmeanings ? malloc(nmeanings * sizeof(mentry)) : NULL);
  19. if (!(*pme)) {