Bug 62 - Use correct type for lo_read() value
Summary: Use correct type for lo_read() value
Status: RESOLVED FIXED
Alias: None
Product: Orthanc
Classification: Unclassified
Component: Plugin - PostgreSQL (show other bugs)
Version: unspecified
Hardware: All All
: --- minor
Assignee: Sébastien Jodogne
URL:
Depends on:
Blocks:
 
Reported: 2020-06-29 15:12 CEST by Sébastien Jodogne
Modified: 2020-06-29 15:20 CEST (History)
0 users

See Also:


Attachments
lo_read.patch (992 bytes, text/x-diff)
2020-06-29 15:18 CEST, Sébastien Jodogne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sébastien Jodogne 2020-06-29 15:12:56 CEST
[BitBucket user: Jasper Lievisse Adriaanse]
[BitBucket date: 2017-08-09.16:41:49]

lo_read() returns an int not a size_t, this fixes a potential issue when reading a large file from PostgreSQL fails.

This was found on OpenBSD 6.1.
Comment 1 Sébastien Jodogne 2020-06-29 15:18:31 CEST
Created attachment 91 [details]
lo_read.patch
Comment 2 Sébastien Jodogne 2020-06-29 15:20:41 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2017-08-11.15:58:26]

Thanks! This is fixed by the following changeset: https://hg.orthanc-server.com/orthanc-postgresql/changeset/5ced32a226b1946fdb9cf832373107ae0ae7aa27