We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e8307d commit 45862f9Copy full SHA for 45862f9
Python/ceval.c
@@ -4794,8 +4794,10 @@ scan_back_to_entry_start(unsigned char *p) {
4794
}
4795
4796
static inline unsigned char *
4797
-skip_to_next_entry(unsigned char *p) {
4798
- for (; (p[0]&128) == 0; p++);
+skip_to_next_entry(unsigned char *p, unsigned char *end) {
+ while (p < end && ((p[0] & 128) == 0)) {
4799
+ p++;
4800
+ }
4801
return p;
4802
4803
@@ -4863,7 +4865,7 @@ get_exception_handler(PyCodeObject *code, int index)
4863
4865
parse_block(scan, &res);
4864
4866
return res;
4867
- scan = skip_to_next_entry(scan);
4868
+ scan = skip_to_next_entry(scan, end);
4869
4870
res.b_handler = -1;
4871
0 commit comments