read-bytes!: avoid integer overflow in read size

Closes #2211
This commit is contained in:
Matthew Flatt 2018-08-06 20:32:42 -06:00
parent b4e44e71a9
commit 5ba910d143

View File

@ -4792,8 +4792,8 @@ static intptr_t fd_get_string_slow(Scheme_Input_Port *port,
while (1) {
/* Loop until a read succeeds. */
int none_avail = 0;
int target_size, target_offset, ext_target;
int none_avail = 0, ext_target;
intptr_t target_size, target_offset;
char *target;
Scheme_Object *sema;