Connection.recv:buf size bug
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Connector/Python |
Fix Released
|
Critical
|
Geert JM Vanderkelen | ||
0.1 |
Fix Released
|
Critical
|
Geert JM Vanderkelen |
Bug Description
sorry about my poor english.
the patch is:
=== (+24,-23) mysql/connector
@@ -92,21 +92,22 @@
if pktnr == -1 and totalsize > 4:
- if pktnr > -1 and totalsize >= pktsize:
+ if pktnr > -1 and totalsize >= pktsize+4:
+ #print '[mysql]recv:', size, pktnr, repr(buf)
- elif len(buf) < pktsize:
+ elif len(buf) < pktsize+4:
because size = pktsize+4, if totalsize >= pktsize and totalsize < pktsize+4, this bug is appear.
Related branches
- Geert JM Vanderkelen: Pending requested
-
Diff: 979 lines (+377/-54) (has conflicts)48 files modifiedChangeLog (+201/-2)
README (+4/-0)
make_release.py (+4/-0)
python2/examples/client.py (+4/-0)
python2/mysql/connector/__init__.py (+1/-1)
python2/mysql/connector/_version.py (+4/-0)
python2/mysql/connector/connection.py (+6/-2)
python2/mysql/connector/constants.py (+1/-1)
python2/mysql/connector/conversion.py (+2/-2)
python2/mysql/connector/cursor.py (+2/-2)
python2/mysql/connector/dbapi.py (+1/-1)
python2/mysql/connector/errors.py (+4/-0)
python2/mysql/connector/mysql.py (+1/-1)
python2/mysql/connector/protocol.py (+1/-1)
python2/mysql/connector/utils.py (+1/-1)
python2/tests/__init__.py (+2/-2)
python2/tests/test_bugs.py (+43/-1)
python2/tests/test_constants.py (+2/-2)
python2/tests/test_conversion.py (+2/-2)
python2/tests/test_cursor.py (+2/-2)
python2/tests/test_examples.py (+2/-2)
python2/tests/test_mysql_datatypes.py (+2/-2)
python2/tests/test_pep249.py (+1/-1)
python2/tests/test_protocol.py (+1/-1)
python2/tests/test_utils.py (+1/-1)
python3/mysql/connector/__init__.py (+1/-1)
python3/mysql/connector/_version.py (+4/-0)
python3/mysql/connector/connection.py (+6/-2)
python3/mysql/connector/constants.py (+1/-1)
python3/mysql/connector/conversion.py (+1/-1)
python3/mysql/connector/cursor.py (+1/-1)
python3/mysql/connector/dbapi.py (+1/-1)
python3/mysql/connector/errors.py (+1/-1)
python3/mysql/connector/mysql.py (+1/-1)
python3/mysql/connector/protocol.py (+1/-1)
python3/mysql/connector/utils.py (+1/-1)
python3/tests/__init__.py (+1/-1)
python3/tests/test_bugs.py (+43/-1)
python3/tests/test_constants.py (+2/-2)
python3/tests/test_conversion.py (+2/-2)
python3/tests/test_cursor.py (+1/-1)
python3/tests/test_examples.py (+2/-2)
python3/tests/test_mysql_datatypes.py (+1/-1)
python3/tests/test_pep249.py (+1/-1)
python3/tests/test_protocol.py (+1/-1)
python3/tests/test_utils.py (+1/-1)
setup.py (+4/-0)
unittests.py (+4/-0)
Changed in myconnpy: | |
assignee: | nobody → Geert JM Vanderkelen (geertjmvdk) |
Changed in myconnpy: | |
status: | Fix Committed → Fix Released |
status: | Fix Released → In Progress |
Changed in myconnpy: | |
status: | Fix Committed → Fix Released |
Thanks for this bug report and patch.
I'm not able to find a good case to reproduce problems. Do you have away to cause problems without patching this code?