diff options
| author | Paul Eggert | 2016-03-04 16:29:55 -0800 |
|---|---|---|
| committer | Paul Eggert | 2016-03-04 16:30:43 -0800 |
| commit | c45a1ca3c4eed56be6ad8086dcc805a86bc5935c (patch) | |
| tree | 69cc5b2e7f8b6d21160ce750f4bffce47a88169b /src | |
| parent | 265141b332edfacd03e10a2de9e070077d0b2e82 (diff) | |
| download | emacs-c45a1ca3c4eed56be6ad8086dcc805a86bc5935c.tar.gz emacs-c45a1ca3c4eed56be6ad8086dcc805a86bc5935c.zip | |
doc string file descriptor exhaustion fix
* src/doc.c (get_doc_string): Move newly-added check to a better
location (Bug#22814).
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -126,9 +126,6 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool definition) | |||
| 126 | fd = emacs_open (name, O_RDONLY, 0); | 126 | fd = emacs_open (name, O_RDONLY, 0); |
| 127 | if (fd < 0) | 127 | if (fd < 0) |
| 128 | { | 128 | { |
| 129 | if ((errno == EMFILE) || (errno == ENFILE)) | ||
| 130 | report_file_error ("Read error on documentation file", file); | ||
| 131 | |||
| 132 | #ifndef CANNOT_DUMP | 129 | #ifndef CANNOT_DUMP |
| 133 | if (!NILP (Vpurify_flag)) | 130 | if (!NILP (Vpurify_flag)) |
| 134 | { | 131 | { |
| @@ -141,6 +138,9 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool definition) | |||
| 141 | #endif | 138 | #endif |
| 142 | if (fd < 0) | 139 | if (fd < 0) |
| 143 | { | 140 | { |
| 141 | if (errno == EMFILE || errno == ENFILE) | ||
| 142 | report_file_error ("Read error on documentation file", file); | ||
| 143 | |||
| 144 | SAFE_FREE (); | 144 | SAFE_FREE (); |
| 145 | AUTO_STRING (cannot_open, "Cannot open doc string file \""); | 145 | AUTO_STRING (cannot_open, "Cannot open doc string file \""); |
| 146 | AUTO_STRING (quote_nl, "\"\n"); | 146 | AUTO_STRING (quote_nl, "\"\n"); |