mirror of
https://github.com/samba-team/samba.git
synced 2025-07-30 19:42:05 +03:00
pytdbpack_pack_data: If the first argument to a 'B' code is not an
Integer, raise an error rather than just returning Null, which breaks the interpreter.
This commit is contained in:
@ -661,8 +661,10 @@ pytdbpack_pack_data(const char *format_str,
|
||||
long size;
|
||||
char *sval;
|
||||
|
||||
if (!PyInt_Check(val_obj))
|
||||
if (!PyInt_Check(val_obj)) {
|
||||
pytdbpack_bad_type(ch, "Integer", val_obj);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
size = PyInt_AsLong(val_obj);
|
||||
pack_uint32(size, &packed);
|
||||
|
Reference in New Issue
Block a user