• Gustavo Niemeyer's avatar
    Fixed sre bug "[#581080] Provoking infinite scanner loops". · c523b04b
    Gustavo Niemeyer yazdı
    This bug happened because: 1) the scanner_search and scanner_match methods
    were not checking the buffer limits before increasing the current pointer;
    and 2) SRE_SEARCH was using "if (ptr == end)" as a loop break, instead of
    "if (ptr >= end)".
    
    * Modules/_sre.c
      (SRE_SEARCH): Check for "ptr >= end" to break loops, so that we don't
      hang forever if a pointer passing the buffer limit is used.
      (scanner_search,scanner_match): Don't increment the current pointer
      if we're going to pass the buffer limit.
    
    * Misc/NEWS
      Mention the fix.
    c523b04b
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.cvsignore Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...