fix for completing quoted filenames with show-all-if-ambiguous set; avoid signed int overflow in intrand32

This commit is contained in:
Chet Ramey
2023-01-10 10:23:14 -05:00
parent 8fd8cd8f7b
commit 0647e53bd1
8 changed files with 83 additions and 18 deletions
+7
View File
@@ -464,6 +464,13 @@ set_buffered_stream (int fd, BUFFERED_STREAM *bp)
return ret;
}
/* Return the BUFFERED_STREAM associated with FD, if any. */
BUFFERED_STREAM *
get_buffered_stream (int fd)
{
return (buffers && fd < nbuffers) ? buffers[fd] : (BUFFERED_STREAM *)0;
}
/* Read a buffer full of characters from BP, a buffered stream. */
static int
b_fill_buffer (BUFFERED_STREAM *bp)