Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from OSGeo:master #61

Merged
merged 156 commits into from
Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
8f7e6db
DGN (v7) driver: emit explicit error when attempting to open a DGNv8 …
rouault Dec 30, 2023
26ff365
HDF5 multidim: fix crash on reading compound data type with fixed-len…
rouault Jan 5, 2024
5e4de4f
S102: add support for spatial metadata of the QualityOfSurvey group
rouault Jan 5, 2024
7ba673c
S102: read nodata value from /Group_F/BathymetryCoverage
rouault Jan 5, 2024
f9506e5
S102: check startSequence=0,0
rouault Jan 5, 2024
a8a76d8
OGRGeocode(): avoid using snprintf() with a formatting string coming …
rouault Jan 1, 2024
45acfbc
CPLODBCSession::ConnectToMsAccess(): avoid using snprintf() with a fo…
rouault Jan 1, 2024
a7fac40
port/: add explicit widening casts to avoid CodeQL cpp/integer-multip…
rouault Jan 1, 2024
4ee198e
SWIG: avoid potential multiplication overflows (CodeQL cpp/integer-mu…
rouault Jan 1, 2024
f76bd6b
Internal libjpeg: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
d214f7d
TIGER: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
3245aff
Selafin: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
8372195
cpl_port.h: add cpl::fits_on<> function
rouault Jan 1, 2024
e79b472
OpenFileGDB: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
8b91d0d
NTF: fix CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
23b5366
NGW: fix CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
d1f3fcc
MITAB: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
6a40dbb
GPKG: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
ad35c6c
AVC: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
35b5218
OGRSimpleCurve::exportToWkt(): avoid CodeQL cpp/integer-multiplicatio…
rouault Jan 1, 2024
f11db5c
OGRWKBIntersectsRingSequencePessimistic(): avoid CodeQL cpp/integer-m…
rouault Jan 1, 2024
deacb5e
RAWDataset: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
c0aca56
GDALComputeBandStats(): avoid potential loss of precision
rouault Jan 1, 2024
3bd8886
GDALDataset::RasterIOResampled(): avoid CodeQL cpp/integer-multiplica…
rouault Jan 1, 2024
439c98f
gdalrasterband: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
0735750
GDALVirtualMem: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
dfbaa18
gdalmultidim: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
f09913a
gdalnodatavaluesmaskband.cpp: avoid CodeQL cpp/integer-multiplication…
rouault Jan 1, 2024
ab4c6a9
gdalnodatamaskband.cpp: avoid CodeQL cpp/integer-multiplication-cast-…
rouault Jan 1, 2024
76eb13c
gdalexif: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
60b23cb
gdalarraybandblockcache: avoid CodeQL cpp/integer-multiplication-cast…
rouault Jan 1, 2024
fb46a75
infback9: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
f3ea172
XYZ: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
39604c0
WMS: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
b6cec5a
VRTDerivedRasterBand::IRasterIO(): fix potential multiplication overflow
rouault Jan 1, 2024
57ed3bb
VRT: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
8121fa5
TSX: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
c5766c2
STACTA: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
c1bcea5
TGA: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
00e1d2b
SRTMHGT: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
a804e38
SAFE: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
b1d3157
SDTS: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
b3ce41f
RMF: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
45cbd4a
RS2: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
625e01c
RIK: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
45ad306
ROI_PAC: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
99593d6
NTv2: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
420ee8f
PAux: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
a62af9b
LCP: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
2208f00
MFF: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
996d63a
ISCE: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
0cabb6d
BT: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
1a54bc5
R: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
9e7efcb
Rasterlite: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
910ea3b
PostGISRaster: fix potential multiplication overflow
rouault Jan 1, 2024
4e051cc
PNG: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
7f14a67
PLMosaic: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
8718652
PDS4: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
63674c5
ISIS3: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
a492aa7
PCIDSK: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
f29b3b3
NITF: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
60a2b42
JPEG: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
e9171c4
MEM: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
4b38a9e
GTiff: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
d7f4d70
GRIB: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
5f0013d
ENVISAT: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
db9007a
AIG: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
dc5b049
gdalenhance: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 1, 2024
8ea5af1
Northwood: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 1, 2024
b6c0062
IRIS: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 1, 2024
0a46662
EXR: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 1, 2024
1e5cc9a
testblockcache: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 1, 2024
496eff9
PDF: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 1, 2024
639db4d
GIF: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 1, 2024
75de865
MSGN: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
4563503
MRF: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
1f229d5
KMLSuperOverlay: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
d817c89
L1B: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
2b85fa9
ILWIS: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
9e38d94
IDRISI: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
cc6f077
HFA: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
ffa3a3c
HF2: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
5bb9905
libgeotiff: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
7e48641
GSBG: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
1768914
GRIB: avoid false-positive CodeQL cpp/new-free-mismatch
rouault Jan 2, 2024
8dffa34
FIT: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
279d858
ERS: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
e50bd20
EEDA: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
a8d76eb
DAAS: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
b36d065
DTED: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
2dfdf7c
CTG: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
b7aeca2
COSAR: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
45dbc40
CEOS2: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
9ea12b0
BMP: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
d18ab34
BLX: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
fc86ed1
AAIGRID: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
1ad7217
testvirtualmem: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
11617ea
test_gdal: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
79e8567
nearblack: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
1348b20
gdaldem: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
9fa1f3a
gdalwarpoperation: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
e2ec080
gdalpansharpen: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
36db342
gdalproximity: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
b1e6e3f
gdalmediancut: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
1c075ee
gdallinearsystem: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
abeb664
gdaldither: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
e797d76
gdal_simplesurf: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
bd72182
gdal_rpc: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
633656c
gdal_crs: avoid CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
37382c7
CPLRecodeToWCharIconv(): avoid CodeQL cpp/incorrect-string-type-conve…
rouault Jan 2, 2024
7e56f66
gdaljp2structure.cpp: fix CodeQL cpp/comparison-with-wider-type
rouault Jan 2, 2024
26f4c56
GPKG: fix CodeQL cpp/sql-injection
rouault Jan 2, 2024
e230146
GML: fix potential cpp/external-entity-expansion CodeSQL issue
rouault Jan 7, 2024
da90786
GMLAS: fix potential cpp/external-entity-expansion CodeSQL issue
rouault Jan 7, 2024
5d68a52
ILI: fix potential cpp/external-entity-expansion CodeSQL issue
rouault Jan 7, 2024
ec1130b
NAS: fix potential cpp/external-entity-expansion CodeSQL issue
rouault Jan 7, 2024
f2b1e83
WEBP: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 7, 2024
fb04ef7
PDF: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 7, 2024
baa14ba
netCDF: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 7, 2024
81e7282
BAG: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 7, 2024
03436bd
HDF5: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 7, 2024
65127c6
g2clib: avoid CodeQL cpp/integer-multiplication-cast-to-long
rouault Jan 7, 2024
27b063d
autotest: make it compatible with current numpy 2.0dev
rouault Jan 9, 2024
cbb15a2
test_gdal.cpp: test GDALWarpApp()/GDALTranslate()/GDALBuildVRT() and …
rouault Jan 9, 2024
c474a5a
Doc of GDALWarpApp()/GDALTranslate()/GDALBuildVRT(): better document …
rouault Jan 9, 2024
5bf55c6
Create codeql.yml
rouault Dec 31, 2023
1ab0742
CSV: do not quote numeric fields even if STRING_QUOTING=ALWAYS (3.8.1…
rouault Jan 10, 2024
87b8a1c
Fix querying of GDAL_DMD_PLUGIN_INSTALLATION_MESSAGE
rouault Jan 10, 2024
f422f5c
Improve error message when a dataset could be opened by a plugin, but…
rouault Jan 10, 2024
15751e3
fuzzers/build.sh: fix curl build
rouault Jan 10, 2024
9aef014
Python bindings: implement __arrow_c_stream__() interface for ogr.Layer
rouault Jan 9, 2024
e4f78be
Python bindings: add a ogr.Layer.GetArrowArrayStreamInterface() method
rouault Jan 9, 2024
acbae48
Doc: Add Maxar logo to sponsorship page
pedros007 Jan 11, 2024
5bc31a0
Update wktproblems.rst
jidanni Jan 11, 2024
aba7876
Update gdal_grid.rst
jidanni Jan 11, 2024
47994c6
Update bsb_read.c
jidanni Jan 11, 2024
e44f142
Add GDALGetOutputDriversForDatasetName()
rouault Jan 8, 2024
5aa3c36
Merge pull request #9051 from pedros007/patch-1
rouault Jan 11, 2024
2a32d0f
Merge pull request #9055 from jidanni/patch-26
rouault Jan 11, 2024
e032505
Merge pull request #9054 from jidanni/patch-25
rouault Jan 11, 2024
969ae60
Merge pull request #9053 from jidanni/patch-21
rouault Jan 11, 2024
3473ba4
Merge pull request #9049 from rouault/plugin_error_msg
rouault Jan 11, 2024
224c2e4
Merge pull request #9048 from rouault/csv_numeric_string_quoting_always
rouault Jan 11, 2024
045d8b8
Merge pull request #9045 from rouault/doc_gdalwarp
rouault Jan 11, 2024
f8270f8
Merge pull request #9043 from rouault/python_arrow_c_stream
rouault Jan 11, 2024
c5534fd
Merge pull request #9044 from rouault/numpy2_compat
rouault Jan 11, 2024
82cb8b3
Merge pull request #9041 from rouault/GDALGetOutputDriversForDatasetName
rouault Jan 11, 2024
120749b
Remove port/cpl_config* files no longer used since the switch to CMake
rouault Jan 11, 2024
b76449f
Add S104 (Water Level Information for Surface Navigation Product) and…
rouault Jan 5, 2024
a39fe1a
Merge pull request #9012 from rouault/codeql
rouault Jan 11, 2024
01f1a36
Merge pull request #9036 from rouault/s102_QualityOfSurvey
rouault Jan 11, 2024
17a36ae
Modify the logic of selection of overviews for non-nearest resampling…
rouault Jan 11, 2024
4f0607d
Merge pull request #9005 from rouault/fix_9004
rouault Jan 11, 2024
95b5fe1
README.md: add OpenSSF Scorecard badge [ci skip]
rouault Jan 11, 2024
41bbd3b
Merge pull request #9028 from rouault/remove_cpl_config_h
rouault Jan 11, 2024
4daa319
Refresh CITATION and CITATION.cff [ci skip]
rouault Jan 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cmake_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ jobs:
ctest --test-dir $GITHUB_WORKSPACE/build -C RelWithDebInfo -V -j 3
env:
SKIP_GDAL_HTTP_SSL_VERIFYSTATUS: YES
BUILD_NAME: "build-windows-conda"
BUILD_NAME: "build-windows-minimum"
- name: Show gdal.pc
shell: bash -l {0}
run: cat $GITHUB_WORKSPACE/build/gdal.pc
Expand Down
149 changes: 149 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
name: "CodeQL"

on:
push:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'c-cpp' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
config: |
query-filters:
- exclude:
id: cpp/non-https-url

- name: Install dependencies
run: |
sudo apt-get install -y ccache cmake g++ swig python3-numpy libproj-dev libqhull-dev
sudo apt-get install -y \
libblosc-dev \
libboost-dev \
libcairo2-dev \
libcfitsio-dev \
libcrypto++-dev \
libcurl4-gnutls-dev \
libexpat-dev \
libfcgi-dev \
libfyba-dev \
libfreexl-dev \
libgeos-dev \
libgeotiff-dev \
libgif-dev \
libhdf5-serial-dev \
libjpeg-dev \
libkml-dev \
liblcms2-2 \
liblz4-dev \
liblzma-dev \
libmysqlclient-dev \
libnetcdf-dev \
libogdi-dev \
libopenexr-dev \
libopenjp2-7-dev \
libpcre3-dev \
libpng-dev \
libpoppler-dev \
libpoppler-private-dev \
libpq-dev \
libproj-dev \
librasterlite2-dev \
libspatialite-dev \
libssl-dev \
libwebp-dev \
libxerces-c-dev \
libxml2-dev \
libxslt-dev \
libzstd-dev \
unixodbc-dev

# cache the .ccache directory
# key it on the runner os, build type, deps, and arch
# It's especially important to include arch in the key because we
# may get runtime errors with -mavx2 from objects built on a
# different architecture.
- name: Restore build cache
if: matrix.language == 'c-cpp'
id: restore-cache
uses: actions/cache/restore@v3
with:
path: ${{ github.workspace }}/.ccache
key: ${{ matrix.id }}-${{ steps.get-arch.outputs.arch }}-${{ github.ref_name }}-${{ github.run_id }}
restore-keys: |
${{ matrix.id }}-${{ steps.get-arch.outputs.arch }}-${{ github.ref_name }}
${{ matrix.id }}-${{ steps.get-arch.outputs.arch }}

- name: Configure ccache
if: matrix.language == 'c-cpp'
run: |
echo CCACHE_BASEDIR=${{ github.workspace }} >> ${GITHUB_ENV}
echo CCACHE_DIR=${{ github.workspace }}/.ccache >> ${GITHUB_ENV}
echo CCACHE_MAXSIZE=250M >> ${GITHUB_ENV}
ccache -z

- name: Build
if: matrix.language == 'c-cpp'
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_CCACHE=YES -DGDAL_USE_LERC_INTERNAL=OFF
make -j$(nproc)

- name: Summarize ccache
if: matrix.language == 'c-cpp'
run: |
ccache -s

- name: Save build cache
if: matrix.language == 'c-cpp'
uses: actions/cache/save@v3
with:
path: ${{ github.workspace }}/.ccache
key: ${{ steps.restore-cache.outputs.cache-primary-key }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
4 changes: 2 additions & 2 deletions CITATION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
To cite GDAL/OGR in publications use:

GDAL/OGR contributors (2023). GDAL/OGR Geospatial Data Abstraction
GDAL/OGR contributors (2024). GDAL/OGR Geospatial Data Abstraction
software Library. Open Source Geospatial Foundation. URL https://gdal.org
DOI: 10.5281/zenodo.5884351

Expand All @@ -10,7 +10,7 @@ A BibTeX entry for LaTeX users is
title = {{GDAL/OGR} Geospatial Data Abstraction software Library},
author = {{GDAL/OGR contributors}},
organization = {Open Source Geospatial Foundation},
year = {2023},
year = {2024},
url = {https://gdal.org},
doi = {10.5281/zenodo.5884351},
}
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cff-version: 1.2.0
message: Please cite this software using these metadata or in the CITATION file.
type: software
title: GDAL
version: 3.8.0
date-released: 2023-11-06
version: 3.8.3
date-released: 2024-01-02
doi: 10.5281/zenodo.5884351
abstract: GDAL is a translator library for raster and vector geospatial data
formats that is released under an MIT style Open Source License by the Open
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ GDAL - Geospatial Data Abstraction Library
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/gdal.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:gdal)
[![Coverage Status](https://coveralls.io/repos/github/OSGeo/gdal/badge.svg?branch=master)](https://coveralls.io/github/OSGeo/gdal?branch=master)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8250/badge)](https://www.bestpractices.dev/projects/8250)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/OSGeo/gdal/badge)](https://securityscorecards.dev/viewer/?uri=github.com/OSGeo/gdal)

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5884351.svg)](https://doi.org/10.5281/zenodo.5884351)

Expand Down
3 changes: 2 additions & 1 deletion alg/gdal_crs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,8 @@ static int calccoef(struct Control_Points *cp, double x_mean, double y_mean,

/* INITIALIZE MATRIX */

m.v = static_cast<double *>(VSICalloc(m.n * m.n, sizeof(double)));
m.v = static_cast<double *>(
VSICalloc(cpl::fits_on<int>(m.n * m.n), sizeof(double)));
if (m.v == nullptr)
{
return (MMEMERR);
Expand Down
2 changes: 1 addition & 1 deletion alg/gdal_rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,7 @@ GDALRPCTransformWholeLineWithDEM(const GDALRPCTransformInfo *psTransform,
int nXWidth, int nYTop, int nYHeight)
{
double *padfDEMBuffer = static_cast<double *>(
VSI_MALLOC2_VERBOSE(sizeof(double), nXWidth * nYHeight));
VSI_MALLOC3_VERBOSE(sizeof(double), nXWidth, nYHeight));
if (padfDEMBuffer == nullptr)
{
for (int i = 0; i < nPointCount; i++)
Expand Down
13 changes: 10 additions & 3 deletions alg/gdal_simplesurf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,16 @@ CPLErr GDALSimpleSURF::ConvertRGBToLuminosity(GDALRasterBand *red,
const int dataGreenSize = GDALGetDataTypeSizeBytes(eGreenType);
const int dataBlueSize = GDALGetDataTypeSizeBytes(eBlueType);

void *paRedLayer = CPLMalloc(dataRedSize * nWidth * nHeight);
void *paGreenLayer = CPLMalloc(dataGreenSize * nWidth * nHeight);
void *paBlueLayer = CPLMalloc(dataBlueSize * nWidth * nHeight);
void *paRedLayer = VSI_MALLOC3_VERBOSE(dataRedSize, nWidth, nHeight);
void *paGreenLayer = VSI_MALLOC3_VERBOSE(dataGreenSize, nWidth, nHeight);
void *paBlueLayer = VSI_MALLOC3_VERBOSE(dataBlueSize, nWidth, nHeight);
if (!paRedLayer || !paGreenLayer || !paBlueLayer)
{
CPLFree(paRedLayer);
CPLFree(paGreenLayer);
CPLFree(paBlueLayer);
return CE_Failure;
}

CPLErr eErr = red->RasterIO(GF_Read, 0, 0, nXSize, nYSize, paRedLayer,
nWidth, nHeight, eRedType, 0, 0, nullptr);
Expand Down
5 changes: 3 additions & 2 deletions alg/gdaldither.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ int GDALDitherRGB2PCTInternal(
/* -------------------------------------------------------------------- */
/* Setup various variables. */
/* -------------------------------------------------------------------- */
int nCLevels = 1 << nBits;
const int nCLevels = 1 << nBits;
const int nCLevelsCube = nCLevels * nCLevels * nCLevels;
ColorIndex *psColorIndexMap = nullptr;

GByte *pabyRed = static_cast<GByte *>(VSI_MALLOC_VERBOSE(nXSize));
Expand Down Expand Up @@ -297,7 +298,7 @@ int GDALDitherRGB2PCTInternal(
*/

pabyColorMap = static_cast<GByte *>(
VSI_MALLOC_VERBOSE(nCLevels * nCLevels * nCLevels * sizeof(GByte)));
VSI_MALLOC_VERBOSE(nCLevelsCube * sizeof(GByte)));
if (pabyColorMap == nullptr)
{
CPLFree(pabyRed);
Expand Down
6 changes: 3 additions & 3 deletions alg/gdallinearsystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ struct GDALMatrix
/// Returns the reference to the element at the position \a row, \a col.
inline double &operator()(int row, int col)
{
return v[row + col * n_rows];
return v[row + col * static_cast<size_t>(n_rows)];
}
/// Returns the element at the position \a row, \a col by value.
inline double operator()(int row, int col) const
{
return v[row + col * n_rows];
return v[row + col * static_cast<size_t>(n_rows)];
}
/// Returns the values of the matrix in column major order.
double const *data() const
Expand All @@ -82,7 +82,7 @@ struct GDALMatrix
n_rows = iRows;
n_cols = iCols;
v.clear();
v.resize(iRows * iCols);
v.resize(static_cast<size_t>(iRows) * iCols);
}

private:
Expand Down
7 changes: 4 additions & 3 deletions alg/gdalmediancut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ int GDALComputeMedianCutPCTInternal(
}

const int nCLevels = 1 << nBits;
const int nCLevelsCube = nCLevels * nCLevels * nCLevels;
T *histogram = nullptr;
HashHistogram *psHashHistogram = nullptr;
if (panHistogram)
Expand All @@ -376,13 +377,13 @@ int GDALComputeMedianCutPCTInternal(
else
{
histogram = panHistogram;
memset(histogram, 0, nCLevels * nCLevels * nCLevels * sizeof(T));
memset(histogram, 0, nCLevelsCube * sizeof(T));
}
}
else
{
histogram = static_cast<T *>(
VSI_CALLOC_VERBOSE(nCLevels * nCLevels * nCLevels, sizeof(T)));
histogram =
static_cast<T *>(VSI_CALLOC_VERBOSE(nCLevelsCube, sizeof(T)));
if (histogram == nullptr)
{
return CE_Failure;
Expand Down
5 changes: 3 additions & 2 deletions alg/gdalpansharpen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,8 @@ CPLErr GDALPansharpenOperation::ProcessRegion(int nXOff, int nYOff, int nXSize,
#endif
const int nDataTypeSize = GDALGetDataTypeSizeBytes(eWorkDataType);
GByte *pUpsampledSpectralBuffer = static_cast<GByte *>(VSI_MALLOC3_VERBOSE(
nXSize, nYSize, psOptions->nInputSpectralBands * nDataTypeSize));
nXSize, nYSize,
cpl::fits_on<int>(psOptions->nInputSpectralBands * nDataTypeSize)));
GByte *pPanBuffer = static_cast<GByte *>(
VSI_MALLOC3_VERBOSE(nXSize, nYSize, nDataTypeSize));
if (pUpsampledSpectralBuffer == nullptr || pPanBuffer == nullptr)
Expand Down Expand Up @@ -1266,7 +1267,7 @@ CPLErr GDALPansharpenOperation::ProcessRegion(int nXOff, int nYOff, int nXSize,

GByte *pSpectralBuffer = static_cast<GByte *>(VSI_MALLOC3_VERBOSE(
nXSizeExtract, nYSizeExtract,
psOptions->nInputSpectralBands * nDataTypeSize));
cpl::fits_on<int>(psOptions->nInputSpectralBands * nDataTypeSize)));
if (pSpectralBuffer == nullptr)
{
VSIFree(pUpsampledSpectralBuffer);
Expand Down
3 changes: 2 additions & 1 deletion alg/gdalproximity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,8 @@ static CPLErr ProcessProximityLine(GInt32 *panSrcScanline, int *panNearX,
panSrcScanline[iPixel] != *pdfSrcNoDataValue) &&
dfNearDistSq <= dfMaxDist * dfMaxDist &&
(pafProximity[iPixel] < 0 ||
dfNearDistSq < pafProximity[iPixel] * pafProximity[iPixel]))
dfNearDistSq < static_cast<double>(pafProximity[iPixel]) *
pafProximity[iPixel]))
pafProximity[iPixel] = static_cast<float>(sqrt(dfNearDistSq));
}

Expand Down
5 changes: 3 additions & 2 deletions alg/gdalwarpoperation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,9 @@ void *GDALWarpOperation::CreateDestinationBuffer(int nDstXSize, int nDstYSize,
/* -------------------------------------------------------------------- */
const int nWordSize = GDALGetDataTypeSizeBytes(psOptions->eWorkingDataType);

void *pDstBuffer = VSI_MALLOC3_VERBOSE(nWordSize * psOptions->nBandCount,
nDstXSize, nDstYSize);
void *pDstBuffer = VSI_MALLOC3_VERBOSE(
cpl::fits_on<int>(nWordSize * psOptions->nBandCount), nDstXSize,
nDstYSize);
if (pDstBuffer == nullptr)
{
return nullptr;
Expand Down
Loading
Loading