Commit Graph
100 Commits
Author SHA1 Message Date
Marco Trevisan (Treviño) 59ecce0a99 virtual-device: Use consistent sleep/wait multiplier under valgrind 2026-06-19 15:43:09 +02:00
Marco Trevisan (Treviño) b587e78b09 test-utils: Do not include the header multiple times 2026-06-19 15:43:09 +02:00
Marco Trevisan (Treviño) 2373769e5b tests/build: Increase the focaltech_moc test timeout
As per commit bad930503c the test data is way bigger than it used to
be, so the test duration is longer.

Thus increase the timeout not to have failures
2026-06-19 15:43:09 +02:00
Marco Trevisan (Treviño) bf91b0ede8 tests/build: Allow to define per-test parameters via a dict 2026-06-19 15:43:09 +02:00
Marco Trevisan (Treviño) 7925c5af13 drivers-api: Add fpi-enums header 2026-06-19 15:37:34 +02:00
Marco Trevisan (Treviño) 71d4c9e7e4 build: Use files to track drivers files
While it's not much needed to ensure rebuild on changes, it may be
useful to get the drivers paths in future
2026-06-19 15:37:34 +02:00
Marco Trevisan (Treviño) f0d4a8830b libfprint/build: Ignore LD_LIBRARY_PATH (and use rpath) on local binaries
DT_RUNPATH is intentionally searched after $LD_LIBRARY_PATH.
-Wl,--disable-new-dtags switches to the old DT_RPATH tag, which is searched
before $LD_LIBRARY_PATH. So the embedded paths in the build binary will now
win over whatever is in the environment.

Not breaking builds.
2026-06-19 15:37:34 +02:00
Marco Trevisan (Treviño) 9e59d69271 fprint-list-metainfo: Write errors messages to stderr by default
So logging won't affect the result
2026-06-19 12:10:33 +02:00
Marco Trevisan (Treviño) 6498a64f3a tests/hwdb: Use all hwdb-related variables for that test only 2026-06-19 12:10:33 +02:00
Marco Trevisan (Treviño) bfa74c2816 ci: Do not fail on coverage report page publication 2026-06-19 12:05:29 +02:00
Marco Trevisan (Treviño) ba5a6a9447 focaltech_moc: Check transfer lengths 2026-06-18 18:10:39 +02:00
Marco Trevisan (Treviño) 169d9addc9 focaltech_moc: Do not set delete feature for 6553 2026-06-18 18:10:39 +02:00
Marco Trevisan (Treviño) 4e92d67048 mafpmoc: bound tpl_info uid usage in logs
Use bounded uid strings for template-info handling.

 - stop printing fixed-size device buffers with raw %s
 - use g_strndup(..., TEMPLATE_UID_SIZE) before logging tpl_info.uid
 - compare delete target uid against the bounded copy
 - log handshake response as bytes instead of %s

This avoids over-read/invalid-UTF8 issues when unknown/corrupted entries
contain non-NUL or 0xff-filled uid data.
2026-06-18 15:49:29 +02:00
Marco Trevisan (Treviño) 4eea5c5e17 mafpmoc: Add various memory cleanups and hardenings 2026-06-18 15:49:27 +02:00
Marco Trevisan (Treviño) 4f743766a5 mafpmoc/custom: Improve test script checking for identified match 2026-06-18 15:49:25 +02:00
Marco Trevisan (Treviño) c1bb621b59 mafpmoc: Fix error handling 2026-06-18 15:49:23 +02:00
Marco Trevisan (Treviño) 3e300ae7ae mapfmoc: Do not use reserved FP prefix for driver types 2026-06-18 15:49:22 +02:00
Marco Trevisan (Treviño) 7df9fc18cf mafpmoc: Use consistent error handling and fix some leaks 2026-06-18 15:49:20 +02:00
Marco Trevisan (Treviño) 14d40fb515 mafpmoc: Code cleanups 2026-06-18 15:49:16 +02:00
Marco Trevisan (Treviño) a4eb3013da mafpmoc: Init the device enroll stage at class init 2026-06-18 15:47:34 +02:00
Marco Trevisan (Treviño) 77b73b04b4 mafpmoc: Allow listing non-fprint prints
It's then up to the upper levels to handle them differently, and fprintd
is already strong enough to ignore them.
2026-06-18 15:47:34 +02:00
Marco Trevisan (Treviño) 5a2762fe17 mafpmoc: Cleanup handling of identify and matching prints
Make clearer the ownership of the prints we're tracking
2026-06-18 15:47:34 +02:00
Marco Trevisan (Treviño) 147f3db814 mafpmoc: Ensure the current task SSM reference is always cleaned up 2026-06-18 15:47:34 +02:00
Marco Trevisan (Treviño) 3cbeb34d36 libfprint/fprint-list-udev-hwdb: Drop mafpmoc from unsupported list 2026-06-18 15:47:34 +02:00
Marco Trevisan (Treviño) 4be0fc60a4 mafpmoc: Init print id value 2026-06-18 15:47:34 +02:00
Marco Trevisan (Treviño) 893003799d mafpmoc: Ignore prints not enrolled by FPrint when listing them 2026-06-18 15:47:34 +02:00
Marco Trevisan (Treviño) b25cbff9be mafpmoc: Do not compare differently signed values 2026-06-18 15:47:34 +02:00
Marco Trevisan (Treviño) b141eca270 mafpmoc: Handle cancellation without overriding the error 2026-06-18 15:47:34 +02:00
Marco Trevisan (Treviño) 95ecaa156d mafpmoc: Improve creation and destruction of templates list 2026-06-18 15:47:34 +02:00
Marco Trevisan (Treviño) 3ce345b876 mafpmoc: Do not pack templates structure
Otherwise undefined sanitizer would fail for unaligned memory access
2026-06-18 15:47:34 +02:00
Marco Trevisan (Treviño) b3ad630fb4 mafpmoc: Steal errors when forwarding their ownerships 2026-06-18 15:47:34 +02:00
Marco Trevisan (Treviño) 8d81299743 mafpmoc: Clear errors when they are not forwarded 2026-06-18 15:47:34 +02:00
Marco Trevisan (Treviño) 67649a0efd pafpmoc: Drop check on fprintd templates
It's not up to the drivers do do this check
2026-06-18 15:47:34 +02:00
Marco Trevisan (Treviño) bbd4ca2fdf mafpmoc: Cleanup code 2026-06-18 15:47:34 +02:00
Marco Trevisan (Treviño) 5b01f0b7c1 secugen: Do image processing inside GTask threads
Do not block the main loop to process image data
2026-06-17 19:47:24 +02:00
Marco Trevisan (Treviño) 4a7842347e secugen: Use autopointers 2026-06-17 19:47:24 +02:00
Marco Trevisan (Treviño) 0c34a2b888 secugen: Use device timeout rather than a custom one 2026-06-17 19:47:23 +02:00
Marco Trevisan (Treviño) 3af57e3483 secugen: Check transfers have a minimal lengths 2026-06-17 19:47:23 +02:00
Marco Trevisan (Treviño) 726cf8a515 secugen: Protect against invalid fw_data
This fixes an issue detected by scan build
2026-06-17 19:47:23 +02:00
Marco Trevisan (Treviño) 732dbe855e fprint-list-metainfo: Update the bug tracker URI 2026-06-17 19:36:59 +02:00
Marco Trevisan (Treviño) 7111218427 docs: Address various issues leading to wrong docs 2026-06-11 15:15:48 +02:00
Marco Trevisan (Treviño) 58a40bb4a3 ci/scan-build: Exclude the full path of the build dir
The tool runs in the build dir as cwd, but let' make this clearer
2026-06-11 15:10:36 +02:00
Marco Trevisan (Treviño) 7c5d1b454d ci: Do pages job also on new tag 2026-06-11 15:10:30 +02:00
Marco Trevisan (Treviño) e40f9825fd ci: Also export docs in pages 2026-06-11 15:10:24 +02:00
Marco Trevisan (Treviño) ed1b18e687 ci: Use upstream image all the times 2026-06-11 15:10:16 +02:00
Marco Trevisan (Treviño) 6a71e039a1 egis_etu905: Double-check that the identified ID is part of the enrolled list 2026-06-10 10:14:51 +02:00
Marco Trevisan (Treviño) 06ad44bc1d egis_etu905: Improve the identify callback data reading 2026-06-10 10:14:51 +02:00
Marco Trevisan (Treviño) c0a9811053 egis_etu905: Do not try to continue a failed SSM 2026-06-10 10:14:51 +02:00
Marco Trevisan (Treviño) 5b51f9c8cc egis_etu905: Sanitize print data parsing 2026-06-10 10:14:51 +02:00
Marco Trevisan (Treviño) 65c3dcb1eb egis_etu905: Avoid potential wrong memory accesses 2026-06-10 10:14:51 +02:00
Marco Trevisan (Treviño) c6f9f094af egis_etu905: drop unused sid field
We read it but we never use it
2026-06-10 10:14:51 +02:00
Marco Trevisan (Treviño) 4b8f46f1f9 egis_etu905: Use fpi-bytes-reader to get the firmware string 2026-06-10 10:14:51 +02:00
Marco Trevisan (Treviño) 42f0b96c10 egis_etu905: Rely on default device cancellable for all the actions
I don't see a reason why we should rely on a different cancellable for
interrupts, but happy to learn more about this
2026-06-10 10:14:51 +02:00
Marco Trevisan (Treviño) 12af25d43b egis_etu905: Set short error using function 2026-06-10 10:14:51 +02:00
Marco Trevisan (Treviño) f5806825de egis_etu905: Remove unused variable 2026-06-10 10:14:51 +02:00
Marco Trevisan (Treviño) fdbc9ee655 egis_etu905: Remove unused transfer 2026-06-10 10:14:51 +02:00
Marco Trevisan (Treviño) c216f04dd1 egis_etu905: Do not leak the transfer buffer
The buffer is now owned by the data, so we should not steal it when
passing it around or we'll leak.
2026-06-10 10:14:51 +02:00
Marco Trevisan (Treviño) 9d4e7fc87b fpi-usb-transfer: Wrap g_error_new arguments 2026-06-08 14:45:40 +02:00
Marco Trevisan (Treviño) e7c80e748e fpi-usb-transfer: Add missing definition of set_short_error()
It was in the header but not implemented
2026-06-08 14:45:40 +02:00
Marco Trevisan (Treviño) f6a8cae5b4 fpi-byte-reader: Add support to read to a static buffer
This works through macros when the size of a buffer is statically
defined
2026-06-08 12:44:44 +00:00
Marco Trevisan (Treviño) dc48ab8b40 fpi-byte-reader: Add support to read and get/peek GBytes 2026-06-08 12:44:44 +00:00
Marco Trevisan (Treviño) 14763d29cf fpi-byte-writer: Add APIs to write and get GBytes
It makes it handier to handle data elements without having to keep size
and data separated
2026-06-08 12:44:44 +00:00
Marco Trevisan (Treviño) 9c140036e9 doc: Include Binary buffer I/O section for the byte reader/writer 2026-06-08 12:44:44 +00:00
Marco Trevisan (Treviño) e8c55c5939 data/autosuspend.hwdb: Sync with unsupported devices wiki 2026-02-10 05:41:06 +00:00
Marco Trevisan (Treviño) fedb62f091 ci: Make jobs interrumpible 2026-02-10 06:35:26 +01:00
Marco Trevisan (Treviño) cc41f805f2 tests/valgrind-python.supp: Ignore PyGObject leaks
They are unrelated to fprint itself, so let's ignore them
2026-02-10 06:33:00 +01:00
Marco Trevisan (Treviño) 1ee7df6cf2 ci: Add PyGObject symbols 2026-02-10 06:33:00 +01:00
Marco Trevisan (Treviño) 3f43c9356c build: Ignore -Werror=unused-but-set-variable for nbis 2026-02-10 06:33:00 +01:00
Marco Trevisan (Treviño) 0c97a47d8e Release 1.94.10 2026-02-10 03:18:14 +01:00
Marco Trevisan (Treviño) b069c78348 fpcmoc: Do not leak the interrupt cancellable
g_set_object adds a reference already so we need to cleanup the original
reference first if we do not want to leak it
2025-12-09 20:37:34 +01:00
Marco Trevisan (Treviño) bd7c745b02 ci: Use rawhide for testing again
Reverts commit: 9141014456
2025-12-06 03:17:52 +01:00
Marco Trevisan (Treviño) aa010b5c3b fp-device: Clarify getter for open property 2025-12-06 03:17:52 +01:00
Marco Trevisan (Treviño) a9c6621119 focaltech_moc: add new pid:0xA27A 2025-12-06 01:39:32 +00:00
Marco Trevisan (Treviño) c2988ae33d drivers: Do not use Fp-prefix for driver-specific types
It's a libfprint specific prefix, so let's avoid confusion.
2025-12-06 01:09:38 +00:00
Marco Trevisan (Treviño) 9a4faf378e libfprint: Use fatal-warnings on g-i-scanner
Be strict on introspection checks, so that we are sure to do the things
properly.
2025-12-06 01:03:51 +00:00
Marco Trevisan (Treviño) a7448fbb4a ci: Only run pages step on push events 2025-08-01 01:47:17 +02:00
Marco Trevisan (Treviño) f84ab3d104 gcovr: Add gcovr project configuration
And mark suspicious hits as warnings instead of failures
2025-08-01 01:42:01 +02:00
Marco Trevisan (Treviño) dc8b05f0a3 Release 1.94.9 2025-02-20 18:41:27 +01:00
Marco Trevisan (Treviño) c37da8568f build: Use fs to get files basename
We can safely bump meson
2025-02-20 18:41:27 +01:00
Marco Trevisan (Treviño) e401fc10e8 build: Do not use deprecated features in meson 2025-02-20 18:28:15 +01:00
Marco Trevisan (Treviño) db48d1a4e4 build: Adapt meson version to requirements 2025-02-20 18:28:15 +01:00
Marco Trevisan (Treviño) d1504a30b7 fp-device: Clarify docs about FP_DEVICE_RETRY_TOO_FAST
This is an error that is valid also for touch devices, so let's make it
more generic in description
2025-02-20 17:20:03 +01:00
Marco Trevisan (Treviño) 7208b29756 tests: Ignore testing external tools with valgrind 2025-02-20 15:50:46 +00:00
Marco Trevisan (Treviño) e9dbfbec39 ci: Install appstream for testing metainfo 2025-02-20 15:50:46 +00:00
Marco Trevisan (Treviño) c6ca915067 tests: Validate the generated metainfo if appstreamcli is available 2025-02-20 15:50:46 +00:00
Marco Trevisan (Treviño) 385bc5e384 libfprint/fprint-list-metainfo: Generate AppStream metainfo
UI tools can use this information to see what package provides support
for specific devices, so let's provide the data since we have it.
2025-02-20 15:50:46 +00:00
Marco Trevisan (Treviño) ee73d67765 scripts/uncrustify: Use 2-spaces indentation for defines too 2025-02-20 15:50:46 +00:00
Marco Trevisan (Treviño) 4dd51f38c7 examples/clear-storage: Remove local storage for devices without storage 2025-02-20 16:37:11 +01:00
Marco Trevisan (Treviño) 5b300edbe5 examples/storage: Clear storage per device
We used to clear the whole storage file, but this has to be done
per-device, not globally
2025-02-20 16:35:58 +01:00
Marco Trevisan (Treviño) 817281f6fd examples/clear-storage: Cleanup code and use better error handling 2025-02-20 16:35:58 +01:00
Marco Trevisan (Treviño) fa5828f8c0 fp-device: Fix introspection warnings in handling closure tag
It has to be defined in the callback, not on the data.
2025-02-20 14:34:13 +01:00
Marco Trevisan (Treviño) fc3effd73b goodixmoc/proto: Use a byte-reader to parse the finger ID 2025-02-13 23:51:52 +00:00
Marco Trevisan (Treviño) 63b5908f38 goodix: Read the header using byte reader 2025-02-13 23:51:52 +00:00
Marco Trevisan (Treviño) 7b97bed91f ci: Add job testing libfprint using address and undefined sanitizers 2025-02-13 23:51:52 +00:00
Marco Trevisan (Treviño) 41949db6ce uru4000: Fix shifting using unsigned types
../libfprint/drivers/uru4000.c:743:35: runtime error: left shift of 138 by 24
places cannot be represented in type 'int'
    #0 0x7fa3e696e06d in imaging_run_state ../libfprint/drivers/uru4000.c:743
    #1 0x7fa3e6a366f6 in __ssm_call_handler ../libfprint/fpi-ssm.c:254
    #2 0x7fa3e6a38cc8 in fpi_ssm_next_state ../libfprint/fpi-ssm.c:465
    #3 0x7fa3e696bd07 in sm_read_reg_cb ../libfprint/drivers/uru4000.c:515
    #4 0x7fa3e6a3db74 in transfer_finish_cb ../libfprint/fpi-usb-transfer.c:352
    #5 0x7fa3ed9b9862 in g_task_return_now ../../glib/gio/gtask.c:1363
    #6 0x7fa3ed9b989c in complete_in_idle_cb ../../glib/gio/gtask.c:1377
    #7 0x7fa3ede4a70b in g_main_dispatch ../../glib/glib/gmain.c:3373
    #8 0x7fa3ede4c8de in g_main_context_dispatch_unlocked ../../glib/glib/gmain.c:4224
    #9 0x7fa3ede4c8de in g_main_context_iterate_unlocked ../../glib/glib/gmain.c:4289
    #10 0x7fa3ede4cfef in g_main_context_iteration ../../glib/glib/gmain.c:4354
    #11 0x7fa3e68d4a1b in fp_device_capture_sync ../libfprint/fp-device.c:2048
2025-02-13 23:51:52 +00:00
Marco Trevisan (Treviño) d8e0791554 goodixmoc/proto: Use FpiByteReader to parse the body
We had some read issues, so let's just use the safer reader that
makes things cleaner too

../libfprint/drivers/goodixmoc/goodix_proto.c:418:42: runtime error:
load of misaligned address 0x0000115ced29 for type 'uint16_t', which
requires 2 byte alignment
0x0000115ced29: note: pointer points here
 00 c0 3f  00 21 64 1c 00 00 00 00  64 00 43 01 01 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00
              ^
    #0 0x7f974ff9e868 in gx_proto_parse_body ../libfprint/drivers/goodixmoc/goodix_proto.c:418
    #1 0x7f974ff8ec79 in fp_cmd_receive_cb ../libfprint/drivers/goodixmoc/goodix.c:185
    #2 0x7f975003ca0c in transfer_finish_cb ../libfprint/fpi-usb-transfer.c:352
    #3 0x7f9756e57862 in g_task_return_now ../../glib/gio/gtask.c:1363
    #4 0x7f9756e5789c in complete_in_idle_cb ../../glib/gio/gtask.c:1377
    #5 0x7f97577f070b in g_main_dispatch ../../glib/glib/gmain.c:3373
    #6 0x7f97577f28de in g_main_context_dispatch_unlocked ../../glib/glib/gmain.c:4224
    #7 0x7f97577f28de in g_main_context_iterate_unlocked ../../glib/glib/gmain.c:4289
    #8 0x7f97577f2fef in g_main_context_iteration ../../glib/glib/gmain.c:4354
    #9 0x7f974fed4656 in fp_device_verify_sync ../libfprint/fp-device.c:1976
2025-02-13 23:51:52 +00:00
Marco Trevisan (Treviño) c7059dc61c goodixmoc: Use FpiByteReader to safely read the device CRC
This is was leading to a potential error due to misaligned memory:

../libfprint/drivers/goodixmoc/goodix.c:167:20: runtime error: load of
misaligned address 0x00001165c989 for type 'uint32_t', which requires 4 byte
alignment
0x00001165c989: note: pointer points here
 00 00 00  00 0a ac b3 09 00 00 00  00 00 00 55 53 42 00 00  00 00 00 56 42 53 00 00  00 00 00 30 30
              ^
    #0 0x7ff3ba98d190 in fp_cmd_receive_cb ../libfprint/drivers/goodixmoc/goodix.c:167
    #1 0x7ff3baa3b235 in transfer_finish_cb ../libfprint/fpi-usb-transfer.c:352
    #2 0x7ff3c18ca862 in g_task_return_now ../../glib/gio/gtask.c:1363
    #3 0x7ff3c18ca89c in complete_in_idle_cb ../../glib/gio/gtask.c:1377
    #4 0x7ff3c228470b in g_main_dispatch ../../glib/glib/gmain.c:3373
    #5 0x7ff3c22868de in g_main_context_dispatch_unlocked ../../glib/glib/gmain.c:4224
    #6 0x7ff3c22868de in g_main_context_iterate_unlocked ../../glib/glib/gmain.c:4289
    #7 0x7ff3c2286fef in g_main_context_iteration ../../glib/glib/gmain.c:4354
    #8 0x7ff3ba8d2fe5 in fp_device_open_sync ../libfprint/fp-device.c:1874
2025-02-13 23:51:52 +00:00
Marco Trevisan (Treviño) 0c315b4f0a tests/goodixmoc: Add explicit test on print description
So that we can ensure that what we get from device matches
2025-02-13 23:51:52 +00:00
Marco Trevisan (Treviño) b04553cac9 goodix-proto: Do not memcpy NULL values
../libfprint/drivers/goodixmoc/goodix_proto.c:214:5: runtime error: null pointer passed as argument 2, which is declared to never be null
    #0 0x7f378839c3e5 in gx_proto_build_package ../libfprint/drivers/goodixmoc/goodix_proto.c:214
    #1 0x7f378838fd9e in alloc_cmd_transfer ../libfprint/drivers/goodixmoc/goodix.c:309
    #2 0x7f378838ffe4 in goodix_sensor_cmd ../libfprint/drivers/goodixmoc/goodix.c:336
    #3 0x7f378839a778 in gx_fp_template_delete_all ../libfprint/drivers/goodixmoc/goodix.c:1602
    #4 0x7f37882d3d59 in fp_device_clear_storage ../libfprint/fp-device.c:1820
    #5 0x7f37882d50af in fp_device_clear_storage_sync ../libfprint/fp-device.c:2132
2025-02-13 23:51:52 +00:00
Marco Trevisan (Treviño) c1dcaa805d goodixmoc: Fix potential invalid shift on integer type
../libfprint/drivers/goodixmoc/goodix_proto.c:111:26: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
    #0 0x7f6776799c2e in reflect ../libfprint/drivers/goodixmoc/goodix_proto.c:111
    #1 0x7f677679a0f3 in crc32_final ../libfprint/drivers/goodixmoc/goodix_proto.c:147
    #2 0x7f677679a3ee in gx_proto_crc32_calc ../libfprint/drivers/goodixmoc/goodix_proto.c:164
    #3 0x7f677679d7aa in gx_proto_init_sensor_config ../libfprint/drivers/goodixmoc/goodix_proto.c:464
    #4 0x7f6776797b40 in gx_fp_init ../libfprint/drivers/goodixmoc/goodix.c:1415
    #5 0x7f67766cc56e in fp_device_open ../libfprint/fp-device.c:866
    #6 0x7f67766d2fd4 in fp_device_open_sync ../libfprint/fp-device.c:1872
2025-02-13 23:51:52 +00:00