GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [2.7] bpo-34400: Fix more undefined behavior in parsetok.c (GH-8833).… · python/cpython@eb9a1c0

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Parser
    • parsetok.c
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Parser/parsetok.c‎

Copy file name to clipboardExpand all lines: Parser/parsetok.c
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,12 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
189189

190190
#ifdef PY_PARSER_REQUIRES_FUTURE_KEYWORD
191191
#endif
192-
if (a >= tok->line_start)
192+
if (a != NULL && a >= tok->line_start) {
193193
col_offset = a - tok->line_start;
194-
else
194+
}
195+
else {
195196
col_offset = -1;
197+
}
196198

197199
if ((err_ret->error =
198200
PyParser_AddToken(ps, (int)type, str, tok->lineno, col_offset,

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.