Commit Graph

11089 Commits

Author SHA1 Message Date
Marcus Meissner
0640d7048e qindex should be between 0 and 4 to avoid overread (AFL) 2020-02-29 20:13:01 +01:00
Marcus Meissner
786650a3f1 add freenode 2020-02-29 17:49:45 +01:00
Marcus Meissner
25c7db3b4c do not call the 9280 command (camera reconfig) on Sony HX and Sony NEX
fixes https://github.com/gphoto/libgphoto2/issues/85
hopefully
2020-02-29 17:49:45 +01:00
Marcus Meissner
4a24bc4d7f split "files" into "flash_files" and "sdram_files", as cameras might pretend to be both
and this is confusing the driver (AFL)
2020-02-29 17:36:42 +01:00
Marcus Meissner
b62b70e908 spca50x: fixed a buffer overflow during yuv2rgb conversion (AFL) 2020-02-24 16:43:42 +01:00
Marcus Meissner
69f379ff0c avoid overflowin the dest buffer on malformed data (AFL) 2020-02-24 11:21:04 +01:00
Marcus Meissner
67fe6c7c56 fixed some potential memory corruptions in agfa cl20 (AFL) 2020-02-24 10:31:01 +01:00
Marcus Meissner
2f8fa357c1 replace old digicam url by gphoto.org doc url
fixes https://github.com/gphoto/libgphoto2/issues/475
2020-02-24 07:40:20 +01:00
Marcus Meissner
e8abf6bc45 2.5.24.1 development starts here 2020-02-23 17:21:11 +01:00
Marcus Meissner
63f8c5233e 2.5.24 release v2.5.24 libgphoto2-2_5_24-release 2020-02-23 16:52:06 +01:00
Marcus Meissner
e3de3a9eca merge from libmtp 2020-02-23 15:53:23 +01:00
Marcus Meissner
8150a9ecb7 added SX730IS 2020-02-21 10:41:31 +01:00
Marcus Meissner
6fdc58714c remove non-exported functions 2020-02-20 06:55:59 +01:00
Hans Ulrich Niedermann
247622de06 travis-ci: exclude OSX gcc from build matrix
On OSX, 'gcc' is an alias for 'clang', so on OSX, both the
so-called 'gcc' and the 'clang' builds actually use clang.

It would be some work to find out which gcc to maybe install
and then use on OSX, so we disable the 'gcc' builds for now.

If someone wants actual gcc builds on OSX, they can take a
look later at

https://docs.travis-ci.com/user/languages/c/#gcc-on-macos

and experiment with finding out which gcc versions are
actually available by default and available in brew and
use those (after possible first installing them).
2020-02-19 16:43:18 +01:00
Marcus Meissner
e36a1617a1 log the ptp opcode + params just to be sure we passed in the right values 2020-02-19 07:41:19 +01:00
Marcus Meissner
2afff46f5a rewrite the port allocation code to not use freed resources,
although this kind of construct likely does not work

fixes crashes with AFL
2020-02-19 07:40:58 +01:00
Hans Ulrich Niedermann
d635d68403 travis-ci: Group all build matrix definitions
Define all build matrix definitions at the start of .travis.yml.
2020-02-19 05:25:51 +01:00
Hans Ulrich Niedermann
e4cb1c9c16 travis-ci: Print --version for autoconf and automake
This can help while debugging build issues.
2020-02-19 05:25:51 +01:00
Hans Ulrich Niedermann
a79045dc0f Use standard syntax for the AC_DEFUN()ed macros 2020-02-19 05:25:51 +01:00
Hans Ulrich Niedermann
2a00d2c36e Fix _GP_EOF m4_pattern bug introduced in 6f65d24796
Fixes: 6f65d24796
2020-02-19 05:20:06 +01:00
Hans Ulrich Niedermann
749968c3eb travis-ci: Print the exact CC and CXX used
This prints a number of CC and CXX version messages, so we can see
better which C and C++ compilers are actually in use.
2020-02-19 05:10:00 +01:00
Hans Ulrich Niedermann
6f65d24796 Make sure both C and C++ programs including gphoto2 headers compile
Check that programs including libgphoto2 headers compile
when compiled for a number of different language standards:

    C:   ansi c99 c11
    C++: ansi c++98 c++11 c++14 c++17

For each of these language standards, if the compiler does not
compile an empty example program, we do not test whether compiling
with the gphoto2/*.h headers included works.

This will work with GCC as the compiler, and also should work with
CLANG as the compiler as CLANG is mostly compatible in these matters.

On other compilers, the test compile of the empty program should
fail, and thus no checks with the gphoto2/*.h headers included will
be performed.

C90/ANSI C apparently does not define __STDC_VERSION__, so the
C source code needed to be changed to become ANSI C compatible.

In C++ pedantic compilation source, we now use actual C++ code
instead of relying on C code working when compiled as C++ code.

In Travis CI, we now actually require both C and C++.
2020-02-19 05:10:00 +01:00
Hans Ulrich Niedermann
b56a50827f configure: Set SLEEP=no now to disable warning sleeps
Allow setting SLEEP=no to disable sleep on warnings like

    ../configure SLEEP=no --prefix=/foo/bar ...

This is implemented with GP_SLEEP and gp_sleep similar to
m4sh's AS_ECHO and $as_echo.
2020-02-19 05:08:08 +01:00
Hans Ulrich Niedermann
2b294a074c tests/Makefile.am: Consistent comments and definitions
Consistently define test programs, and use comments to
structurize the tests/Makefile.am file.
2020-02-19 05:08:08 +01:00
Hans Ulrich Niedermann
fb75d3632d examples: Remove unused TESTS= instance
Any TESTS definition causes "make check" to run a test suite,
even if no tests are actually defined.

So we remove the empty TESTS= from examples/Makefile.am, and
keep on using the TESTS in the tests/Makefile.am file.
2020-02-18 18:56:09 +01:00
Marcus Meissner
ae22d5d948 added some new SONY Property defines, hook up sony capturetarget 2020-02-18 16:39:08 +01:00
Hans Ulrich Niedermann
be9e0a889a New set based camlib definition and --with-camlibs handling
This uses proper set operations both for GP_CAMLIB and for handling
the --with-camlibs value. This allows all GP_CAMLIB definitions to
be present at autoreconf time (as m4 code) time while some camlib
definitions being conditional at the time of the configure run (in
the sh code).

The ./configure output is still a bit verbose, but we can reduce that
verbosity later when we have found out that this works well on people's
different systems.

Fixes: https://github.com/gphoto/libgphoto2/issues/467
2020-02-17 23:19:41 +01:00
Hans Ulrich Niedermann
7539525efd travis-ci: "make uninstall" needs sudo as well, of course
If "make install" runs with sudo, of course "make uninstall"
will need to run under sudo as well.
2020-02-17 22:49:14 +01:00
Hans Ulrich Niedermann
155aac3fa8 travis-ci: Apart from .travis-script.sh, only one quick build
That one quick build is in-tree, includes sudo for "make install",
and does both "make clean" and "make uninstall".

That should exercise a few more code paths.
2020-02-17 21:57:18 +01:00
Hans Ulrich Niedermann
dd87744b9d travis-ci script: clean up directory usage, add usage comment 2020-02-17 21:41:11 +01:00
Hans Ulrich Niedermann
6b5887ef6a travis-ci: Move builds to separate script file
The handling of failing build steps has become too involved
to put it into a single command line in a ".travis.yml".

The new build script does a few things differently:
  * No sudo use.
  * Builds for and installs into separate root --prefix
  * Builds as out of tree builds per build

The new things the new build script does:
  * Print config.log and the test-suite.log files if the configure
    or the "make check" stages have failed.
  * Print the version information, both short and verbose.
  * Print a list of the installed files.

The things the new build script does NOT do:
  * Run "make clean" or "make uninstall"

We are keeping the old script lines around for the time
being. I cannot see a difference, but someone more familiar
with "vusb" and "examples/sample-afl" might.
2020-02-17 03:29:54 +01:00
Hans Ulrich Niedermann
2d6e5d91af travis-ci: sleep after autoreconf as possible workaround
Sleeping after generating the configure file might help avoid
the build system sanity check fails.
2020-02-17 03:17:19 +01:00
Hans Ulrich Niedermann
a9aec24c7b libgphoto2-port: Add libexif to version information 2020-02-17 02:57:47 +01:00
Hans Ulrich Niedermann
94c0fdb0e1 Add print-libgphoto2-version program
The new print-libgphoto2-version program prints the complete
libgphoto2 version message in both short and verbose.

This functionality had not been available before, and we
want it for checking later changes to the camlib list part
of the version messages.
2020-02-15 02:56:38 +01:00
Hans Ulrich Niedermann
d15f0d7167 travis-ci: If make check fails, cat the test-suite.log files
This should help with finding the actual causes of test suite failures
during travis-ci checks.
2020-02-15 02:55:17 +01:00
Hans Ulrich Niedermann
29f61dd4ac travis-ci: print system date and ls -l configure to help with debugging
Print the system date and "ls -l configure" to help with debugging
the sane build system check failure.
2020-02-14 15:41:45 +01:00
Marcus Meissner
5963aa4c3d error checking during file retrieval (AFL) 2020-02-14 12:59:19 +01:00
Marcus Meissner
739b75da57 initialize memory to NULL, check if read (AFL) 2020-02-14 12:45:49 +01:00
Hans Ulrich Niedermann
2a7b017281 Avoid "echo" in configure.ac in some places
This should avoid some possible incompatibities in the case
of the multi line string argument to "echo", and cleans up
the code by replacing a number of "echo" commands with a
single AC_MSG_WARN.
2020-02-14 11:51:43 +01:00
Marcus Meissner
19c923e5d2 check buffersize before decoding to avoid overread (AFL) 2020-02-13 14:32:07 +01:00
Marcus Meissner
5581a92d48 check for filesize to avoid overread (AFL) 2020-02-13 14:23:51 +01:00
Marcus Meissner
8b22f8f524 avoid going below arrax index 0 (AFL) 2020-02-11 07:30:58 +01:00
Marcus Meissner
d6d4fd7683 log invaliddram and return error to avoid endless loop (AFL) 2020-02-10 16:51:58 +01:00
Marcus Meissner
fe42811465 do not sleep during fuzzing (AFL) 2020-02-10 13:40:48 +01:00
Marcus Meissner
67d70968be fixed integer overflow check to avoid overflow (AFL) 2020-02-08 17:41:12 +01:00
Marcus Meissner
02df2f3f42 Added nikon coolpix 4100 (sierra) (It also works in PTP mode though) 2020-02-03 08:29:02 +01:00
Marcus Meissner
9980bc1fee added fix for GoPro files not appearing caused by another hack for another device 2020-02-02 12:58:17 +01:00
Marcus Meissner
95d726f760 faster fuzzing 2020-02-01 18:44:26 +01:00
Marcus Meissner
2ddf19764d handle partial read files, avoid crashes (AFL) 2020-02-01 18:24:23 +01:00
Marcus Meissner
409b88262c added gopro hero 7 silver 2020-02-01 17:18:17 +01:00