diff options
author | David Lawrence <dkl@mozilla.com> | 2015-01-27 05:27:50 +0100 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2015-01-27 05:27:50 +0100 |
commit | 90244813fe8110fc91f3746ebd93880e1c911cf1 (patch) | |
tree | 34ff732e860855956f043d0a41db8b2f30ef0095 /Bugzilla/Attachment.pm | |
parent | a748745d3eb9110b0c6bcd803d8d86db8951ad43 (diff) | |
download | bugzilla-90244813fe8110fc91f3746ebd93880e1c911cf1.tar.gz bugzilla-90244813fe8110fc91f3746ebd93880e1c911cf1.tar.xz |
Bug 1124432: Backport upstream bug 1079065 to bmo/4.2 to fix improper use of open() calls
Diffstat (limited to 'Bugzilla/Attachment.pm')
-rw-r--r-- | Bugzilla/Attachment.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index 33a4c55a5..8361c1cce 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -344,7 +344,7 @@ sub data { # If there's no attachment data in the database, the attachment is stored # in a local file, so retrieve it from there. if (length($self->{data}) == 0) { - if (open(AH, $self->_get_local_filename())) { + if (open(AH, '<', $self->_get_local_filename())) { local $/; binmode AH; $self->{data} = <AH>; @@ -390,7 +390,7 @@ sub datasize { # is stored in a local file, and so retrieve its size from the file, # or the attachment has been deleted. unless ($self->{datasize}) { - if (open(AH, $self->_get_local_filename())) { + if (open(AH, '<', $self->_get_local_filename())) { binmode AH; $self->{datasize} = (stat(AH))[7]; close(AH); |