diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 566c4b211d6..8c7e8e5cb43 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -28065,18 +28065,7 @@ store_mode_line_string (const char *string, Lisp_Object lisp_string, | |||
| 28065 | 28065 | ||
| 28066 | if (string != NULL) | 28066 | if (string != NULL) |
| 28067 | { | 28067 | { |
| 28068 | #if defined HAVE_ANDROID && !defined ANDROID_STUBIFY \ | 28068 | len = strnlen (string, precision <= 0 ? SIZE_MAX : precision); |
| 28069 | && __ANDROID_API__ < 22 | ||
| 28070 | /* Circumvent a bug in memchr preventing strnlen from returning | ||
| 28071 | valid values when a large limit is specified. | ||
| 28072 | |||
| 28073 | https://issuetracker.google.com/issues/37020957 */ | ||
| 28074 | if (precision <= 0 || ((uintptr_t) string | ||
| 28075 | > (UINTPTR_MAX - precision))) | ||
| 28076 | len = strlen (string); | ||
| 28077 | else | ||
| 28078 | #endif /* HAVE_ANDROID && !ANDROID_STUBIFY && __ANDROID_API__ < 22 */ | ||
| 28079 | len = strnlen (string, precision <= 0 ? SIZE_MAX : precision); | ||
| 28080 | lisp_string = make_string (string, len); | 28069 | lisp_string = make_string (string, len); |
| 28081 | if (NILP (props)) | 28070 | if (NILP (props)) |
| 28082 | props = mode_line_string_face_prop; | 28071 | props = mode_line_string_face_prop; |