Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit45862f9

Browse files
authored
Prevent access outside buffer (GH-26012)
1 parent8e8307d commit45862f9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎Python/ceval.c‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4794,8 +4794,10 @@ scan_back_to_entry_start(unsigned char *p) {
47944794
}
47954795

47964796
staticinlineunsignedchar*
4797-
skip_to_next_entry(unsignedchar*p) {
4798-
for (; (p[0]&128)==0;p++);
4797+
skip_to_next_entry(unsignedchar*p,unsignedchar*end) {
4798+
while (p<end&& ((p[0]&128)==0)) {
4799+
p++;
4800+
}
47994801
returnp;
48004802
}
48014803

@@ -4863,7 +4865,7 @@ get_exception_handler(PyCodeObject *code, int index)
48634865
parse_block(scan,&res);
48644866
returnres;
48654867
}
4866-
scan=skip_to_next_entry(scan);
4868+
scan=skip_to_next_entry(scan,end);
48674869
}
48684870
res.b_handler=-1;
48694871
returnres;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp