Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fixed heap-buffer-overflow in PyOS_StdioReadline when encountering null
bytes in interactive input. Patch by Shamil Abdulaev.
Comment thread
ashm-dev marked this conversation as resolved.
Outdated
2 changes: 1 addition & 1 deletion Parser/myreadline.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ PyOS_StdioReadline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt)
break;
}
n += strlen(p + n);
} while (p[n-1] != '\n');
Comment thread
ashm-dev marked this conversation as resolved.
} while (n > 0 && p[n-1] != '\n');

pr = (char *)PyMem_RawRealloc(p, n+1);
Comment thread
ashm-dev marked this conversation as resolved.
if (pr == NULL) {
Expand Down
Loading