Author louielu
Recipients louielu
Date 2017-02-25.13:53:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1488030784.09.0.674246877605.issue29649@psf.upfronthosting.co.za>
In-reply-to
Content
For this situation, check boundary error message didn't correctly show out.

>>> import struct
>>> import ctypes
>>> byte_list = ctypes.create_string_buffer(1)
>>> struct.pack_into('b', byte_list, 5, 1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
struct.error: pack_into requires a buffer of at least 1 bytes

Since offset is setting at 5, it should at least need `offset + soself->s_size` bytes to store it.
History
Date User Action Args
2017-02-25 13:53:04louielusetrecipients: + louielu
2017-02-25 13:53:04louielusetmessageid: <1488030784.09.0.674246877605.issue29649@psf.upfronthosting.co.za>
2017-02-25 13:53:04louielulinkissue29649 messages
2017-02-25 13:53:03louielucreate