thamoscorp / minimosd-extra

Automatically exported from code.google.com/p/minimosd-extra
0 stars 0 forks source link

OOB array access in PTPCamera library #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. none

What is the expected output? What do you see instead?
PTP::MoveObject() assign parent to params array at position 2, while there is 
only 0 and 1 available.

What version of the product are you using? On what operating system?
/trunk@576

Please provide any additional information below.
Please apply following patch.

--- libraries/PTPCamera/ptp.cpp (wersja 576)
+++ libraries/PTPCamera/ptp.cpp (kopia robocza)
@@ -498,7 +498,7 @@
 uint16_t PTP::MoveObject(uint32_t handle, uint32_t storage_id, uint32_t parent)
 {
    OperFlags   flags = { 3, 0, 0, 0, 0, 0 };
-   uint32_t    params[2];
+   uint32_t    params[3];

    params[0] = handle;
    params[1] = storage_id;

Original issue reported on code.google.com by krzyszto...@gmail.com on 12 Apr 2013 at 7:25

GoogleCodeExporter commented 9 years ago
Closed as we have a new version.

Ifthe problem is still present please reopen it.

Original comment by gabek...@gmail.com on 28 Nov 2014 at 11:44