summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Object.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Object.pm')
-rw-r--r--Bugzilla/Object.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm
index a7c92b269..66dac9422 100644
--- a/Bugzilla/Object.pm
+++ b/Bugzilla/Object.pm
@@ -87,6 +87,9 @@ sub _init {
|| ThrowCodeError('param_must_be_numeric',
{function => $class . '::_init'});
+ # Too large integers make PostgreSQL crash.
+ return if $id > MAX_INT_32;
+
$object = $dbh->selectrow_hashref(qq{
SELECT $columns FROM $table
WHERE $id_field = ?}, undef, $id);
@@ -165,6 +168,8 @@ sub new_from_list {
detaint_natural($id) ||
ThrowCodeError('param_must_be_numeric',
{function => $class . '::new_from_list'});
+ # Too large integers make PostgreSQL crash.
+ next if $id > MAX_INT_32;
push(@detainted_ids, $id);
}
# We don't do $invocant->match because some classes have