12839 Commits

Author SHA1 Message Date
Marcus Meissner
852a26cef9 make length unsigned int 2026-06-21 13:12:03 +02:00
Marcus Meissner
fda7ecf08a widen loop counter to unsigned int, to quieten checkers https://github.com/gphoto/libgphoto2/security/code-scanning/189 2026-06-21 13:10:47 +02:00
Marcus Meissner
3950c6347c widen int to quieten checker https://github.com/gphoto/libgphoto2/security/code-scanning/190 2026-06-21 13:09:58 +02:00
Marcus Meissner
58dbf1f400 reenable duplicate filename check, see https://github.com/gphoto/libgphoto2/issues/1238 2026-06-21 12:38:42 +02:00
Marcus Meissner
9f5d4f9ca0 on apple we have good getobjecthandles, use it for handling the root dir. https://github.com/gphoto/libgphoto2/issues/1258 2026-06-21 12:34:45 +02:00
Marcus Meissner
b4d96f3f99 Merge pull request #1257 from gphoto/dependabot/github_actions/github/codeql-action-4.36.2
build(deps): bump github/codeql-action from 4.36.1 to 4.36.2
2026-06-08 15:40:21 +02:00
dependabot[bot]
5bbcfdef33 build(deps): bump github/codeql-action from 4.36.1 to 4.36.2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.36.1 to 4.36.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](87557b9c84...8aad20d150)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.36.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-08 13:26:25 +00:00
Marcus Meissner
2c48aae6c3 Merge pull request #1255 from jcubic/nikon-d780
feat: improve support for Nikon D780
2026-06-08 09:36:33 +02:00
Jakub Jankiewicz
f118d5f163 feat: improve support for Nikon D780 2026-06-07 17:24:45 +02:00
Marcus Meissner
aceab6545f Merge pull request #1252 from gphoto/dependabot/github_actions/github/codeql-action-4.36.1
build(deps): bump github/codeql-action from 4.36.0 to 4.36.1
2026-06-03 09:58:49 +02:00
Marcus Meissner
67a637e92e Merge pull request #1253 from gphoto/dependabot/github_actions/actions/checkout-6.0.3
build(deps): bump actions/checkout from 6.0.2 to 6.0.3
2026-06-03 09:58:34 +02:00
dependabot[bot]
02013bd95a build(deps): bump actions/checkout from 6.0.2 to 6.0.3
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.2 to 6.0.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](de0fac2e45...df4cb1c069)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-02 16:06:31 +00:00
dependabot[bot]
81dfd0b18a build(deps): bump github/codeql-action from 4.36.0 to 4.36.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.36.0 to 4.36.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](7211b7c807...87557b9c84)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.36.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-02 16:06:26 +00:00
Marcus Meissner
5bcec62750 added Add support for Ricoh GR IV (VID=0x25fb, PID=0x2123)
fixes https://github.com/libmtp/libmtp/pull/395
fixes https://github.com/libmtp/libmtp/issues/392
2026-06-02 12:01:48 +02:00
Marcus Meissner
68b55d9aaa Merge pull request #1251 from gphoto/dependabot/github_actions/github/codeql-action-4.36.0
build(deps): bump github/codeql-action from 4.35.5 to 4.36.0
2026-05-30 14:02:51 +02:00
Marcus Meissner
a6ab2af6f6 2.5.34.1 development 2026-05-30 13:46:45 +02:00
Marcus Meissner
a4ec9cc8b7 2.5.34 release v2.5.34 libgphoto2-2_5_34-release 2026-05-30 13:16:00 +02:00
Marcus Meissner
cd36b6d72d imported from libmtp 2026-05-30 13:09:06 +02:00
Marcus Meissner
48ff26c12a updated NEWS 2026-05-30 12:36:41 +02:00
Marcus Meissner
ca6822ebd9 added arabic 2026-05-30 12:21:46 +02:00
Zayed Al-Saidi
4c53df4a56 added arabic 2026-05-30 12:21:46 +02:00
dependabot[bot]
570e1b7ced build(deps): bump github/codeql-action from 4.35.5 to 4.36.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.5 to 4.36.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](9e0d7b8d25...7211b7c807)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.36.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-25 19:35:42 +00:00
Marcus Meissner
fc5fd47852 Merge pull request #1248 from gphoto/dependabot/github_actions/github/codeql-action-4.35.5
build(deps): bump github/codeql-action from 4.35.4 to 4.35.5
2026-05-20 19:34:14 +02:00
dependabot[bot]
842eebb728 build(deps): bump github/codeql-action from 4.35.4 to 4.35.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.4 to 4.35.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](68bde559de...9e0d7b8d25)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-18 23:17:44 +00:00
Marcus Meissner
74c4911128 document Nikon Z new prop list method 2026-05-12 17:11:24 +02:00
Marcus Meissner
40b2ecace9 use 0xd argument to get deviceprops 2026-05-12 15:32:46 +02:00
Marcus Meissner
b1cc028618 implement nikon getvendorcodes, and use it in fixup
https://github.com/gphoto/gphoto2/issues/700
2026-05-12 15:31:44 +02:00
Marcus Meissner
3232fa0290 Merge pull request #1246 from gphoto/dependabot/github_actions/github/codeql-action-4.35.4
build(deps): bump github/codeql-action from 4.35.3 to 4.35.4
2026-05-12 09:47:57 +02:00
dependabot[bot]
59c9399cb2 build(deps): bump github/codeql-action from 4.35.3 to 4.35.4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.3 to 4.35.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](e46ed2cbd0...68bde559de)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-11 21:09:48 +00:00
Marcus Meissner
ec26ac0150 added flashready for nikon report 2026-05-11 15:21:28 +02:00
Marcus Meissner
d9f8e503ac report d1b2 - infodisperrstatus for Nikons in normal tree
https://github.com/gphoto/gphoto2/issues/700
2026-05-11 15:17:59 +02:00
Marcus Meissner
80ec822575 adjusted nEWS 2026-05-11 15:17:59 +02:00
Temuri Doghonadze
940306d7ba updated gregorian 2026-05-11 15:17:59 +02:00
Cristian Othón Martínez Vera
4fbec7a646 updated spanish 2026-05-11 15:17:59 +02:00
Marcus Meissner
75b3622876 Merge pull request #1245 from gphoto/dependabot/github_actions/github/codeql-action-4.35.3
build(deps): bump github/codeql-action from 4.35.1 to 4.35.3
2026-05-05 09:10:23 +02:00
dependabot[bot]
fb10a3e918 build(deps): bump github/codeql-action from 4.35.1 to 4.35.3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.1 to 4.35.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](c10b8064de...e46ed2cbd0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-04 17:16:57 +00:00
Marcus Meissner
2dcd397b46 Merge pull request #1244 from pppanghu77/master
Fixed CHDK Live View Bitmap Desc Memset Target (Copy-Paste Bug)
2026-04-28 10:27:38 +02:00
Liu Jinchang
40cf5c9507 Fixed CHDK Live View Bitmap Desc Memset Target (Copy-Paste Bug)
In chdk_camera_capture_preview(), the memset for bmd was incorrectly
using &vpd as the target, leaving bmd uninitialized with stack garbage.
This is a copy-paste error from the memset line above for vpd.
2026-04-28 10:02:43 +08:00
Marcus Meissner
10953bcb42 Merge pull request #1242 from pppanghu77/master
Fixed CHDK Live View Bitmap Desc Wrong Offset (Copy-Paste Bug)
2026-04-27 11:01:48 +02:00
Liu Jinchang
464b6ce0d5 Fixed CHDK Live View Bitmap Desc Wrong Offset (Copy-Paste Bug)
In ptp_chdk_parse_live_data(), the bitmap framebuffer descriptor (bmd)
was being unpacked using header->vp_desc_start instead of the correct
header->bm_desc_start offset. This is a copy-paste error from the line
above that unpacks the viewport descriptor (vpd).
2026-04-27 13:52:52 +08:00
Marcus Meissner
017be23b45 Merge pull request #1240 from watsonmw/a7r3_fix_timeout
Sony hang fix for pre-2020 cameras
2026-04-24 08:36:06 +02:00
Marcus Meissner
ab37203f62 Apply suggestions from code review
Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl>
2026-04-24 08:35:36 +02:00
Mark Watson
10870c84ca Sony hang fix for pre-2020 cameras
Disable call to ptp_getobjecthandles() with storageid = PTP_HANDLER_SPECIAL
(0xffffffff)

< 2020 cameras hang, > 2020 cameras return PTP_RC_StoreNotAvailable.

From Sony docs:

    2.00 - ptp_getobjecthandles() not documented / not recommended
    3.00 - ptp_getobjecthandles() with 0xffffffff not supported
2026-04-22 08:20:19 -07:00
Marcus Meissner
09f8a940b1 Fixed Sony DPD FormFlag OOB Read (CWE-125) — MEDIUM
ptp_unpack_Sony_DPD() reads the FormFlag byte via dtoh8o(data, *poffset)
without a prior bounds check. The standard ptp_unpack_DPD() at line
686–687 correctly validates *offset + sizeof(uint8_t) > dpdlen before
this same read, but the Sony variant omits this check.

CVE-2026-40339

Reported-By: Sebastián Alba <sebasjosue84@gmail.com>
2026-04-15 11:05:37 +02:00
Marcus Meissner
3b9f9696be Fixed Sony DPD Enum Count OOB Read (CWE-125) — MEDIUM
In the PTP_DPFF_Enumeration case of ptp_unpack_Sony_DPD(), dtoh16o(data, *poffset) reads 2 bytes for enumeration count N without verifying 2 bytes remain. The standard parser at line 704 has this check.

CVE-2026-40338

Reported-By: Sebastián Alba <sebasjosue84@gmail.com>
2026-04-15 11:04:54 +02:00
Marcus Meissner
433bde9888 Fixed UINT128/INT128 Unchecked Offset Advance (CWE-125) — MEDIUM
Finding 5: UINT128/INT128 Unchecked Offset Advance (CWE-125) — MEDIUM

In ptp_unpack_DPV(), the PTP_DTC_UINT128 and PTP_DTC_INT128 cases advance *offset += 16 without verifying 16 bytes remain. The entry check at line 609 only guarantees *offset < total (at least 1 byte available). After the unchecked advance, *offset can exceed total, and the CTVAL macro's bounds check (total - *offset < sizeof(target)) wraps due to unsigned arithmetic.

CVE-2026-40335

Reported-By: Sebastián Alba <sebasjosue84@gmail.com>
2026-04-15 11:04:08 +02:00
Marcus Meissner
259fc7d3bf Fixed Canon FolderEntry Missing Null Termination
ptp_unpack_Canon_FE() copies filename with strncpy into a 13-byte
buffer without explicit null termination. The EOS variant at line
1451–1452 correctly adds fe->Filename[PTP_CANON_FilenameBufferLen-1]
= 0; confirming this was recognized as necessary but not applied to the
original Canon path.

 CVE-2026-40334

Reported-By: Sebastián Alba <sebasjosue84@gmail.com>
2026-04-15 11:03:15 +02:00
Marcus Meissner
7c7f515bc8 Fixed ObjectInfo Parser OOB Read
ptp_unpack_OI() validates len < PTP_oi_SequenceNumber (i.e., len < 48) but then accesses:

    Offsets 48–51: dtoh32a(data + PTP_oi_SequenceNumber) at line 563 (4 bytes OOB)
    Offset 52: data[PTP_oi_filenamelen] at line 547 (5 bytes OOB)
    Offset 56: data[PTP_oi_filenamelen+4] at line 547 (9 bytes OOB)

The Samsung Galaxy 64-bit objectsize detection heuristic reads up to 9 bytes beyond the validated boundary.

 CVE-2026-40340

Reported-By: Sebastián Alba <sebasjosue84@gmail.com>
2026-04-15 11:01:36 +02:00
Marcus Meissner
1817ecead2 Fixed EOS ImageFormat/CustomFuncEx Parsers Lack Length Parameter
ptp_unpack_EOS_ImageFormat() and ptp_unpack_EOS_CustomFuncEx() accept
const unsigned char** data but no length/size parameter. They perform
unbounded reads via dtoh32o calls (up to 36 bytes for ImageFormat,
up to 1024 bytes for CustomFuncEx). Callers in ptp_unpack_EOS_events()
have xsize available but never pass it.

 CVE-2026-40333

Reported-By: Sebastián Alba <sebasjosue84@gmail.com>
2026-04-15 10:59:13 +02:00
Marcus Meissner
c385b34af2 Fixed OOB read in ptp_unpack_EOS_FocusInfoEx
Do not read out values before checking there is sufficient size

CVE-2026-40341
2026-04-15 10:58:06 +02:00