pytdbpack_calc_reqd_len: It's no longer an error to supply more data
authorMartin Pool <mbp@samba.org>
Mon, 4 Nov 2002 21:56:24 +0000 (21:56 +0000)
committerMartin Pool <mbp@samba.org>
Mon, 4 Nov 2002 21:56:24 +0000 (21:56 +0000)
values than are consumed.
(This used to be commit 0c1cfe559877d51090409d67f983a82bbbbaa7e2)

source3/python/py_tdbpack.c

index 8478ab28a512ac77ca09485008def15287091b6b..6c697533a0c121fa87d56fced0353b902f8313f8 100644 (file)
@@ -307,7 +307,8 @@ pytdbpack_calc_reqd_len(char *format_str,
 
                if (val_i >= val_len) {
                        PyErr_Format(PyExc_IndexError,
-                                    "samba.tdbpack.pack: value list is too short for format string");
+                                    "%s: value list is too short for format string",
+                                    __FUNCTION__);
                        return -1;
                }
 
@@ -323,13 +324,6 @@ pytdbpack_calc_reqd_len(char *format_str,
                        len += item_len;
        }
 
-       if (val_i != val_len) {
-               PyErr_Format(PyExc_IndexError,
-                            "%s: value list is wrong length for format string",
-                            __FUNCTION__);
-               return -1;
-       }
-
        return len;
 }