| Change 560733739 by alexsav@alexsav:fig-export-hunspell-fix-2-1266-change-1:1270:citc on 2023/08/28 09:31:02 |
| |
| Checks for non-print characters before xml attributes |
| |
| PRESUBMIT=passed |
| BUG=297514503 |
| FIXED=297514503 |
| R=mghiware |
| APPROVED=mghiware |
| REQUIRED_REVIEW=1 |
| DELTA=2 (1 added, 0 deleted, 1 changed) |
| DELTA_BY_EXTENSION=cxx=2 |
| OCL=560162596 |
| FIG_CHANGESET=87faae99d65cea0369b2cff4ec0cfb6f77e44c70 |
| FIG_WORKSPACE=alexsav/1266:hunspell-fix-2 |
| |
| Affected files ... |
| |
| ... //depot//src/hunspell/hunspell.cxx#9 edit |
| |
| ==== //depot//src/hunspell/hunspell.cxx#8 - /google/src/files/560733739/depot//src/hunspell/hunspell.cxx ==== |
| --- /google/src/files/550677556/depot//src/hunspell/hunspell.cxx 2023-07-24 17:40:58.000000000 -0400 |
| +++ /google/src/files/560733739/depot//src/hunspell/hunspell.cxx 2023-08-28 12:31:02.000000000 -0400 |
| @@ -4,6 +4,7 @@ |
| #include <stdlib.h> |
| #include <string.h> |
| #include <stdio.h> |
| +#include <cctype> |
| #include <vector> |
| |
| #include "hunspell.hxx" |
| @@ -1697,7 +1698,7 @@ |
| do { |
| p = strstr(p, attr); |
| if (!p || p >= end) return 0; |
| - } while (*(p-1) != ' ' && *(p-1) != '\n'); |
| + } while (*(p-1) != ' ' && *(p-1) != '\n' && isprint(*(p-1))); |
| return p + strlen(attr); |
| } |
| |