diff options
| author | Po Lu | 2023-08-07 10:18:49 +0800 |
|---|---|---|
| committer | Po Lu | 2023-08-07 10:18:49 +0800 |
| commit | fb997c8a8c1cde191986336d3ea83e911b32700b (patch) | |
| tree | e384e881355040760b8c6a10e63ae24af7daaea1 /src | |
| parent | c71a520d1da636a722cf87b46534ca3b5aafbc7b (diff) | |
| download | emacs-fb997c8a8c1cde191986336d3ea83e911b32700b.tar.gz emacs-fb997c8a8c1cde191986336d3ea83e911b32700b.zip | |
Repair hang in android_fdopen
* src/androidvfs.c (android_fdopen): Do not neglect to
update next when iterating through open_parcel_fds.
Diffstat (limited to 'src')
| -rw-r--r-- | src/androidvfs.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/androidvfs.c b/src/androidvfs.c index d6daff481b0..5afa752163d 100644 --- a/src/androidvfs.c +++ b/src/androidvfs.c | |||
| @@ -5606,7 +5606,7 @@ android_saf_file_open (struct android_vnode *vnode, int flags, | |||
| 5606 | 5606 | ||
| 5607 | method = service_class.open_document; | 5607 | method = service_class.open_document; |
| 5608 | trunc = (flags & O_TRUNC); | 5608 | trunc = (flags & O_TRUNC); |
| 5609 | write = ((flags & O_RDWR) == O_RDWR || (flags & O_WRONLY)); | 5609 | write = (((flags & O_RDWR) == O_RDWR) || (flags & O_WRONLY)); |
| 5610 | inside_saf_critical_section = true; | 5610 | inside_saf_critical_section = true; |
| 5611 | descriptor | 5611 | descriptor |
| 5612 | = (*android_java_env)->CallNonvirtualObjectMethod (android_java_env, | 5612 | = (*android_java_env)->CallNonvirtualObjectMethod (android_java_env, |
| @@ -6917,11 +6917,12 @@ android_fdopen (int fd, const char *mode) | |||
| 6917 | if (fd != new_fd) | 6917 | if (fd != new_fd) |
| 6918 | emacs_abort (); | 6918 | emacs_abort (); |
| 6919 | 6919 | ||
| 6920 | goto open_file; | 6920 | break; |
| 6921 | } | 6921 | } |
| 6922 | else | ||
| 6923 | next = &(*next)->next; | ||
| 6922 | } | 6924 | } |
| 6923 | 6925 | ||
| 6924 | open_file: | ||
| 6925 | return fdopen (fd, mode); | 6926 | return fdopen (fd, mode); |
| 6926 | } | 6927 | } |
| 6927 | 6928 | ||