#!/usr/local/bin/python #2003-10-19. Feedback import dbm print """ Python dbm bugs summary: 1. Long strings cause weirdness. 2. Long keys fail without returning error. This demonstrates serious bugs in the Python dbm module. Present in OpenBSD versions 2.2, 2.3, and 2.3.2c1. len(key+string)>61231 results in the item being 'lost', without warning. If the key or string is one character shorter, it is fine. Writing multiple long strings causes unpredictable results (none, some, or all of the items are lost without warning). Curiously, keys of length 57148 return an error, but longer keys fail without warning (sounds like an = instead of a > somewhere). """ mdb=dbm.open("mdb","n") print "Writing 1 item to database, but upon reading," k='k' v='X'*61230 #Long string mdb[k]=v mdb.close() md=dbm.open("mdb","r") print "database contains %i items"%len(md.keys()) md.close()
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4